Unit Testing Flashcards

1
Q

Software Testing

A

Manual

Automated

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

Manual

A

Done by humans
Creativity
Subjectivity

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

Automated

A
Done by computer automation
Speed / Efficiency
Lower cost per execution
Repeatability / Dependability
Accuracy
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Exploratory Testing

A

explores the functionality of the system looking for defects, missing features, usability, or other opportunities for improvement. Almost always manual.

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

Regression Testing

A

validates that existing functionality continues to operate as expected, as new functionality is added and defects are resolved. Usually automated.

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

Acceptance Testing

A

is performed from the perspective of a user of a system in order to verify the requirements have been satisfied

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

Integration Testing

A

is a broad category of tests that validate integration between units of code or code and outside dependencies such as a database, network resource, or file

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

Functional Testing

A

validates that the functional design has been satisfied

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

Unit Testing

A

is low level testing performed by the programmer to validate that individual units of code function as expected by the programmer

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

Some Other Types of Testing

A
Performance
Scalability
Usability
Accessibility
Portability
Smoke / Sanity
Alpha
Beta
Stress
Security
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Unit Tests

Rules

A
Rules:
No external dependencies
On logical assertion per test
Test code should be the same quality as product code
Test early, test often
Don’t save them for the end
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

JUnit

A

JUnit is a Java Framework for writing and running Unit Tests.
Package: org.junit

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

The life cycle (order of operation) of JUnit tests are controlled

A

by annotations on public methods in the class.

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

@Before
@Test
@After

A
  • runs before each test, to do setup
  • runs as the test
  • runs after each test to cleanup

@Before
public void setup() { }

@Test
public void test_something() { }

@After
public void cleanup() { }

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