Implementation - Testing Flashcards
Testing
What Distinct Goals does testing have?
Defect Testing: To discover faults or defects in the software where the behavior of the software is incorrect, undesirable or does not confirm to its specification.
Validation Testing: To demonstrate to the developer and customer that the software meets it requirements
Why should we do Defect Testing?
Defect testing aims to detect software failures: So that defects may be discovered and corrected.
Testing cannot establish that a software product works properly
It is impossible to determine this for all possible conditions
It is only possible to determine that it does not function properly under a specific set of conditions
“Testing can only show the presence of errors, not their absence” – Dijkstra et al, 1972.
Why should we do Validation Testing?
To demonstrate to the developer and customer that the software meets its requirements
Can be done by checking whether the system performs correctly using a given set of test cases that reflect the system’s expected use.
How can we record and track Bugs?
Work management systems can be used to track bugs or issues
Can assign and prioritize them
Can be treated as a task (e.g. back log item)
Could also record general project issues (not just software bugs) e.g. can’t find a cheap database.
What are the 4 Levels of testing?
1) Unit tests
2) Integration tests
3) System tests
4) Acceptance tests
(In Order)
What happens in Unit Testing?
Test individual sections of code
Normally an individual method/function/procedure in the code
E.g. In Java, a unit is a method.
Unit tests rely on automation:
Unit test frameworks such as Junit, NUnit and the C++ boost unit test framework are used to automate this
Program that observes what data users change (“from”), what they change it to (“to”), then applies the change to another value (“source”).
The unit tests check whether the answer the program gives (given the change by the user) is correct or not
What happens in Integration Testing?
Test whether a set of modules that must work together do so without error
Unit tests should have passed at this point
Components may be integrated in stages and tested
For example, connecting a database to an application
What happens in System Testing?
Test a completely integrated system
Integration test should be done by this stage
The following aspect can be tested:
Scalability testing
Security testing
Load and stability testing
Recoverability testing
Documentation testing
Installation testing
What happens in Acceptance testing?
1) User acceptance testing (UAT)
2) Contractual and regulatory acceptance testing
3) Alpha and beta testing:
Alpha testing is simulated or actual operation testing by potential users ( or an independent test team at the developer’s site)
Versions are released to a small number of actual users who begin to test the system with real data and monitor the system for errors
How do we write test cases?
Given-When-Then (GWT) is a semi-structured way to write down test cases.
Test case 1: “Adding items to the sopping cart”
Give: I am on the homepage
When: I click fish
And I click the product id “FI-FW-01” link in the table
And I click the “add to cart” button for the Spotted Koi
Then I should see the description = “Spotted Koi” added to the shopping cart.
What does GWT Stand for?
Given-When-Then
How can we implement automated tests?
Using Katalon studio
Record the actions in the test case
Can run multiple tests at once using test suits
Export the report as HTML
What are some other testing types, techniques and tactics
Regression testing – Find defects after a major code change has occurred (re-run tests, so automation is very useful)
Performance testing – assess how a system performs in terms of responsiveness and stability under a particular workload (e.g. lots of input data)
Usability testing – Check if the user interface is easy to use and understand
A/B Testing – Running a controlled experiment to determine if a proposed change is more effective than the current approach
What is a test plan?
A test plan is a document detailing:
Types of tests that will be used
Processes and procedures
Personnel requirements
Test cases
Automated testing tools enable execution and reporting of tests