Download as pdf or txt
Download as pdf or txt
You are on page 1of 15

Workshop Testing Like A Pro

Software Testing

• Why do we need to test?


• What do we need to test?
• How do we test (and retest)?
What to test?
But wait: we’re doing Agile!
• Continuous testing
• Continuous feedback
• Involving the whole team
• Quick feedback
• High-level software quality
• Less documentation
• Test-driven
Tools: Unit-testing

• Whitebox
• Used to test code behaviour
• Executed by testrunner
• Scope is very small
• For fine-grained technical testing
• Should be part of developer workflow
Recap: Triple A
// Arrange - Setup the code to be used
Dep department = new Dep();

// Act - Execute the method to be tested


String toCompare = department.hello("J oe");

// Assert - Check if the method postcondition is as expected


assertEquals("Hello Joe!", toCompare);
Tools: Integration Testing

• Graybox
• Used to test behaviour of components working
together
• Executed by testrunner
• Brittle by nature
• Could be part of developer workflow
Integration test example

• Should you test the DB?


• Might need a mock, fake or stub
Tools: System test

• Black box
• Automated user (or system behavior) testing
• On the entire system (end to end)
• Executed by testrunner
• Brittle by nature
• Could be part of developer workflow
System test tooling

• Cypress
• Selenium (grid)
Tools: Acceptance testing

• Blackbox
• Used to define functional tests
• Executed by a human tester
• Time-consuming
• For end-to-end user-interaction scenario’s
• Could be part of Sprint Demo
Important tests not yet discussed:

• API testing (exercise)


• Front end unit tests (later QA workshop)
• User experience tests (later workshop)
• Many more
Test plan

• Test strategy:
– Why you test
– What you test
– How you test
• User acceptance tests
Teacher demos:

• Simple unit test recap (triple A)


• Postman (manual testing of API, can be automated)
• Mockito for mocking (Mock/Stub/Fake)

You might also like