如何进行正确的测试?

发布于 2024-10-19 10:35:05 字数 131 浏览 6 评论 0原文

到目前为止,我编写的代码并没有真正考虑过它是否完全防错。我熟悉 JUnit,并且对如何使用它来测试方法等有一个模糊的概念。除此之外我还可以做哪些测试?

PS:我知道这是一个潜在的广泛话题。我只需要一些线索,这样我就可以做一些阅读。

Up until now I've written code without really giving a thought to whether it was fully bug proof or not. I'm familiar with JUnit and have a vague idea of how I can use it to test methods and such. What sort of tests can I do beyond that?

P.S: I know it's a potentially vast topic. I just need a few leads so I can do some reading.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

旧城空念 2024-10-26 10:35:05

首先是使用 JUnit,然后是测试驱动开发。是的,使用 JUnit,但更重要的是,了解什么是测试驱动开发。它将显着改善您的编码和设计。

http://en.wikipedia.org/wiki/Test-driven_development

There's using JUnit, and then there's test driven development. Yes, use JUnit, but more importantly, learn what test driven development is. It will improve your coding and design significantly.

http://en.wikipedia.org/wiki/Test-driven_development

枕花眠 2024-10-26 10:35:05

查看软件开发的V 模型,它将为您提供很好地概述了您应该测试软件的级别

Have a look at the V model of software development which will give you a good overview of the levels at which you should test your software

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文