How do I run JUnit from NetBeans?

前端 未结 6 1358
臣服心动
臣服心动 2020-12-30 02:41

I\'ve been trying to understand how to start writing and running JUnit tests.

When I\'m reading this article:

http://junit.sourceforge.net/doc/testinfected/t

6条回答
  •  孤城傲影
    2020-12-30 02:59

    All the above answers are correct, but if you are using in mac little change needed.

    Step 1 Write your junit class.

    Step 2 Right click on the class ->Tools-> Create/Updates Tests-> Select framework as Junit-> click ok.

    Step 3 Right click on the file again ->Test File.

    Now it will run as junit, will show the Test Result.

提交回复
热议问题