Technology Specific Testing Methods Flashcards

1
Q

Explain the concept of testing against theory.

A

Does the behaviour of a program match cold facts that you may know of beforehand.

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

Explain the concept of testing against reality

A

Does the behaviour match observed phenomena that you can confirm.

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

How should you test a closed source library where the only details you get are header files and printed instructions?

A

Wrap into a single module and test it.

Use a range of black-box techniques like input partitioning.

A problem is not knowing the internal state variables and how they are allocated and changed.

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

How can you approach testing a GUI application?

A

Use models to represent User Interactions. (since GUIs are event driven)

Split testing based on mvc model. Test view, controller and model separately

Look for unguarded inputs (reading code basically)

Use capture and replay automation tools.
- Not always a good idea. What if buttons and screens are removed.

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

Why is OO code hard to test?

A

Inheritance means changes to parents have impacts to children.

State means that methods on same object may interact, sequences matter.

One object can have members that are pointers to other objects.

Polymorphism meas that code being called isn’t known at compile-time.

Errors can come from superclasses that you don’t control.

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

How can we get around some difficulties of testing OO code?

A

Use the class as the unit and have unit testing (JUnit style) regression tests for it. Use stubs and mocks in place of other classes.

Use a lot of assertions. Check if class in valid state at beginning and end of their method bodies.

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

How can you go about testing shrinkwrap web apps?

A

Simple websites are subjected to coverage of graph of links between pages.

Tools like selenium IDE record interactions and check results.

Treat web browser as just another configuration variable.

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

How can you go about testing a reactive system?

One that depends on it’s environment and in turn the environment is influenced by the system behaviour.

A

You will first want to fully understand the environment and go about simulating it.

May be really hard in competitive situations where other actors are gonna react to your system’s actions.

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

How might you go about testing with concurrent systems involved.

Introduced new failure mechanisms (livelock, deadlock, starvation, priority inversion, data corruption.)

A

Tests parts in isolation and as monothreaded as possible.

Build autotesters that stress test the system

User models to understand how locks are taken and released.

Some tools can be used to detect data races, ThreadSanitizer

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

What’s a huge problem about concurrency failures?

A

They are incredibly difficult to trace and reproduce.

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