嵌入式C ++系统中的连续集成/单元测试 [英] Continuous Integration/ Unit testing in embedded C++ systems

查看:244
本文介绍了嵌入式C ++系统中的连续集成/单元测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通常用于单元测试,特别是嵌入式系统的连续集成的工具有哪些?



我特别想到你通常需要交叉编译和部署,也不能轻易地可视化目标平台。



我可以使用什么来缓解这些困难?



(我认为它应该是某种双重目标,其中构建服务器在更容易的目标上运行测试)

解决方案

对于单元测试,看看Unity。
http://sourceforge.net/apps/trac/unity/wiki
是一个真正轻量级的测试工具(2 x .h和1 x .c文件)由Ruby脚本支持。我们已经在嵌入式ARM7目标系统中使用单元测试(通过串行端口重定向测试报告)。
它也支持CMock for(惊喜,惊喜)嘲讽。即使不是广泛,这些伟大的事情是他们是如此容易使用。
关于CI,那么Hudson是非常好的,如果你是基于Linux的。
也请参阅CppUTest,并查看James Grenning的书TDD for Embedded C,网址为: http://renaissancesoftware.net/


What tools are generally used for unit testing and especially continuous integration for embedded systems?

I am especially thinking that you usually have to cross-compile and deploy, and also that you can't easily visualize the target platform. Also it can be difficult to run test-code and frameworks.

What could I use too alleviate these difficulties?

(I think it should be some kind of dual targeting, where the build server runs its tests on a easier target)

解决方案

For unit testing, take a look at Unity. http://sourceforge.net/apps/trac/unity/wiki It is a really lightweight test harness (2 x .h and 1 x .c file) supported by Ruby scripts. We have been using in an embedded ARM7 target system for unit testing (redirecting test reporting over a serial port). It is also supported by CMock for (surprise, surprise) Mocking. Even though not extensive, the great thing about these is they are so easy to use. Regarding CI, then Hudson is very good if you're Linux based. Also look at CppUTest and check out James Grenning's book "TDD for Embedded C" at http://renaissancesoftware.net/

这篇关于嵌入式C ++系统中的连续集成/单元测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆