Lecture 2 - Test Driven Development Flashcards
(14 cards)
What is Unit Testing?
Focuses on the smallest unit of software design (functions, etc).
What is Integration Testing?
Tests the combination of unit tested components.
What is Regression Testing?
Tests that a component works properly even after adding components to the complete program.
What is Alpha Testing?
A type of acceptance testing done before the product is released to customers (done by QA).
What is Beta Testing?
Conducted at one or more customer sites by the end-user of the software. This version is released for a limited number of users.
What is System Testing?
Tests that all works for different operating systems. Includes security testing, recovery testing, stress testing, and performance testing.
JUnit features include:
- Assertions for testing expected results;
- Test fixtures for sharing common test data;
- Test runners for running tests.
What is JUnit?
a simple, open source framework to
write and run repeatable tests.
import.org.junit
Import statement for using the following annotations
@Test
Identifies a method as a Test Method
@Before
Executed before each test. It is used to prepare the test environment
@After
Executed after each test. it is used to cleanup the test environment
@BeforeClass
Executed once, before the start of all tests. It is used to perform time intensive activities. Methods marked with this annotation need to be defined as static to work with JUnit.
@AfterClass
Executed once, after all tests have been finished. It is used to perform time clean-up activities, for example, to disconnect from a database. Methods annotated with this annotation need to be defined as static to work with JUnit.