学习JUnit和适当的软件工程的示例项目 [英] Sample project for learning JUnit and proper software engineering

查看:84
本文介绍了学习JUnit和适当的软件工程的示例项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很难在测试和代码之间建立连接。我可以在这里提出很多关于目录结构和测试类命名以及JUnit 3 vs 4等问题的问题,但是我宁愿找一个正确的示例项目并通过阅读来学习。

I'm having a hard time making the connection between testing and code. I could ask numerous questions here about things like directory structure and naming of test classes and JUnit 3 vs 4 and so on, but I'd rather find a sample project that does it right and learn by reading it.

我想要一些不太复杂的东西,以便我能够轻松理解它,而JUnit 4将是最好的(没有理由坚持3,因为我刚开始新鲜,对吧?)。我在Windows 7上,我使用Eclipse,我正在计划/希望学习和使用Hudson。我喜欢Ant,对Maven没有很好的体验,但也很酷。

I'd like something not too complex so that I can understand it easily, and JUnit 4 would be best (no reason to stick with 3 since I'm starting fresh, right?). I'm on Windows 7, I use Eclipse and I'm planning/hoping to learn and use Hudson. I like Ant, haven't had a good experience with Maven but that's cool too.

是否有符合此标准的示例项目?

Is there a sample project out there that fits this criteria?

编辑:这些答案都没有提到哈德森;我真的很喜欢Craftsman的文章(也许它会进入持续集成)但是其他人还有其他任何建议吗?

edit: Neither of these answers mentioned Hudson; I really like the Craftsman articles (and maybe it goes into continuous integration) but does anyone else have any other suggestions?

推荐答案

我发现Robert Martin(Uncle Bob)的 Craftsman 文章是学习有效单元测试的绝佳资源。它侧重于测试驱动开发,并带您了解新编码器的经验,学习如何测试代码。第一篇文章可以在这里找到并被称为 The Craftsman#1:Opening灾难即可。

I found the Craftsman articles by Robert Martin (Uncle Bob) an excellent resource for learning effective unit testing. It focuses on Test Driven Development and walks you through the experience of a new coder learning how to test code. The first article can be found here and is called The Craftsman #1: Opening Disaster.

这篇关于学习JUnit和适当的软件工程的示例项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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