Lecture 3 Flashcards

1
Q

Why does testing need to be automated?

A

Manually testing sofware is inefficient, expensive and will have huge impacct on metrics such as lead time for changes, change failure rate

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

Why does DevOps adopt the ‘Shift Left Testing’ approach?

A

Because the closer to production you are, the more expensive defects will be to fix

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

What is an example of a local environment?

A

A developer’s own machine

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

What is a development environment?

A

The first environment the code reaches after leaving the developer’s machine

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

What is a staging environment?

A

Should be as close to the production environment as possible

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

What is the production environment?

A

Where you serve customer traffic

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

What has a larger number of tests, unit tests or E2E tests?

A

Unit tests

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

What has more integration/execution time and higher costs, E2E tests or integration tests?

A

E2E

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

What is unit testing?

A

A way of testing small units of code that will be logically isolated in a system

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

What is an example of a type of testing that’s relatively cheap and fast?

A

Unit testing

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

What are example of different frameworks used for writing automated tests?

A

NUnit, JUnit, Pytest

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

What are the main features of a test framework?

A

-Library
-Test runner
-Reporting

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

In the context of unit testing, what does code coverage mean?

A

To what degree the unit tests executes the source program

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

What is important to remember about the reliability of code coverage?

A

Just because the code coverage of a test is 100% that doesn’t mean every possible behaviour can be predicted; code coverage can be 100% but doesn’t test to see what happens if we divide by 0 for example

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

What is the difference between statement coverage and branch coverage?

A

Statement coverage means all lines of code are executed, branch coverage can be all if-statements for example

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

What is TDD?

A

Software development process that relies on the repetition of a very short development cycle

17
Q

What does integration testing do?

A

Tests that different components of a software work together as a group

18
Q

If we need to do integration testing but all components aren’t finished, what can we use?

A

Stubs or drivers

19
Q

What is the difference between bottom up and top down integration testing?

A

Top down starts at the top of the module hierarchy, bottom up starts with modules that have the least amount of dependencies

20
Q

What is the Big Bang approach to integration testing?

A

Waiting until all of the components are finished to test

21
Q

What are APIs?

A

Entry-point of applications and/or customers to an application

22
Q

What are two examples of APIs exposed over a network? (Web services)

A

-REST
-SOAP

23
Q

Why do we need to test APIs?

A

To verify business logic verification, data integrity and correctness

24
Q

What is Swagger used for?

A

API testing

25
Q

How is API testing similar to Unit testing?

A

-AAA pattern
-Avoid anti patterns