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.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is TDD?

A

Test Driven Development. Unit Test fail fix

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How would you prevent a test from being run without commenting it out?

A

@Ignore annotation along with the @Test annotation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly