Unit, Integration, and Functional Testing Flashcards

1
Q

What is a unit?

A

Smallest testable part of an application.

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

What is a unit test?

A

Testing an isolated unit via API.

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

Are unit tests performed in memory?

A

Yes. There are no permanent changes.

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

Are unit tests safe to run over and over again?

A

Yes.

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

Do unit tests take a long time to execute?

A

Not. They’re fast.

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

What are assertions in unit testing?

A

A statement that predicate is going to be TRUE.

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

What do assertions validate?

A

The correctness of code.

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

What is an integration test?

A

Integration tests build on unit tests by combining and testing resulting combinations.

Unlike the focus on unit tests on APIs, integration tests can also include user interfaces and results.

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

Are integration tests done in one or multiple systems?

A

It can be either depending on the architecture of the application.

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

What kind of environment do integration tests use?

A

Unlike unit tests, they use partial or full environments including persistent layers such as databases and services.

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

Which is harder to maintain: unit tests or integration tests?

A

Integration tests.

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

How is functional testing different than both unit and integration testing?

A

In functional testing, the focus is on the result, not the code.

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

What does a functional test check?

A

It checks a specific feature and compares the result against the specification from which it was created. This is typically in the form of a user workflow.

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

Is functional testing slower or faster to execute than unit and integration tests?

A

They are slower.

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

What is system testing?

A

System testing is a form of testing that is similar to integration testing, however, uses the complete system.

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

What defects does system testing help us find?

A

Defects in both individual pieces, and the system as a whole.

17
Q

What is regression?

A

A type of software but that occurs when a feature stops working after a change.

18
Q

What is regression testing?

A

Re-running unit and integration tests after a change is made to the application.