12. Software Testing Flashcards
Reasons for testing
- detect defects
- support design and implementation
- prevent introduction of defects
- document behaviour of system
- demonstrate system meets specification
testing concepts
interface
- expected service of a system
failures
- deviation from expected system behaviour
defects
- causes failure of system
slips
- actions by programmers that introduces defects
scales of test
- unit test
- integration test
- acceptance test
test terminologies
test case
- set of actions to be performed on software with an expected outcome
test
- execution of a test case
testing
- practice of creating, maintaining, evaluating test cases
defects testing
goal
- discover defects to be rectified
derived from
- architecture and design documents
acceptance testing
goals
- demonstrate system meets requirements
derived from
- requirement specification
behavioural driven development
derive test cases from a collection of user stories and scenarios
user story
scenario
steps
step functions
API
implementation
mapping steps in test case
scenario
GIVEN –> how to setup test
WHEN –> actions to take during test
THEN –> assertions to be made and output at the end of the test
Good practices for BDD
- keep scenarios short
- have individual step short
- comply with GWT pattern
- write features in user domain language
- use frameworks sot reduce redundancy
- develop feature and implementation gradually
- work with customers to validate features
limitation of BDD
- specification by example which needs many examples
- philosophy makes abstraction difficult
- need to maintain steps definitions as features changes
- hard coding of dependencies
- only one level of abstraction possible with gherkin
- gherkin steps sequential so all combinations have to be expressed
smoke test (Define)
A smoke test is a quick automated test to make sure that there arent’t any visable signs of problems with the system.
What is a pull request (Define)
A pull request – also referred to as a merge request – is an event that takes place in software development when a contributor/developer is ready to begin the process of merging new code changes with the main project repository.
When do developers merge code?
When do developers merge code?
Development and testing is done in 4 servers.
In what order does the work flow through them?
- DEV/Development Server - Dev work
- SIT /system integration testing server - Functional and regression testing
- UAT/ User acceptance testing server - Where customers test it and we fix any errors.
- PROD/production server - Published and live for the public to use.
What is an (system) integration test, and a unit test?
An integration test is a test that including a function that will run all the way to the database and back so make sure all of the components are functioning together. A unit test is a test that tests business logic. It is done by the developers. It is best practice but not always done.