JUnit Flashcards
1
Q
What is JUnit?
A
JUnit is a testing framework to write repeatable tests for java programming language.
- simple and open source
- use to manage test script for WebDriver.
2
Q
What is TDD?
A
Test Driven Development. Unit Test fail fix
3
Q
What are the annotations in JUnit? Order of execution?
A
JUNIT ANNOTATIONS is a special form of syntactic meta-data that can be added to Java source code for better code readability and structure.
@BeforeClass Executed before the first @Test method in JUnit test class
@Before Executed before all the @Test methods
@Test Executed for all @Test methods
@After Executed after all @Test methods
4
Q
How would you prevent a test from being run without commenting it out?
A
@Ignore annotation along with the @Test annotation.