How To Run a JUnit Test Class?
Submitted by: AdministratorA JUnit test class usually contains a number of test methods. You can run all test methods in a JUnit test class with the JUnitCore runner class. For example, to run the test class HelloTest.java described previously, you should do this:
java -cp .;
junit-4.4.jar org.junit.runner.JUnitCore HelloTest
JUnit version 4.4
.
Time: 0.015
OK (1 test)
This output says that 1 tests performed and passed.
Submitted by: Administrator
java -cp .;
junit-4.4.jar org.junit.runner.JUnitCore HelloTest
JUnit version 4.4
.
Time: 0.015
OK (1 test)
This output says that 1 tests performed and passed.
Submitted by: Administrator
Read Online JUnit Job Interview Questions And Answers
Top JUnit Questions
☺ | What Is JUnit? |
☺ | Why Does Poeple Import org.junit.Assert Statically? |
☺ | How To Wirte a Simple JUnit Test Class? |
☺ | Why Do You Use JUnit to Test Your Code? |
☺ | How Do You Launch a Debugger When a Test Fails? |
Top Testing Categories
☺ | Manual Testing Interview Questions. |
☺ | Rational TestSuite Interview Questions. |
☺ | QTP Interview Questions. |
☺ | Database Testing Interview Questions. |
☺ | Software QA Interview Questions. |