Testing Strategy — 2/3 — Levels vs Types
Understand the vocabularies
This article is part of a serie:
Through the SQLC, many test types are executed at different levelsThat’s what we call test levels, referring to the levels in the pyramid. But we can divide into four levels as shown in the diagram below :
Testing levels are basically to identify missing areas and prevent overlap and repetition between the development life cycle phases. Hence there are various levels of testing:
- Unit Testing
- Integration Testing
- System Testing
- Acceptance Testing
These four testing levels cannot be applied randomly during development. There is a logical sequence that should be adhered to in order to minimise the risk of bugs cropping up just before the launch date.
By progressively testing the simpler components of the system and moving on the more complex groupings, the testers can rest assured they are thoroughly examining the software in the most efficient way possible.
The four levels of tests shouldn’t only be seen as a hierarchy that extends from simple to complex, but also as a sequence that spans the whole development process from the early to the later stages. Note however that later does not imply that acceptance testing is done only after say 6 months of development work. In a more agile approach, acceptance testing can be carried out as often as every 2–3 weeks, as a part of the sprint demo. In an organisation working more traditionally it is quite typical to have 3–4 releases per year, each following the cycle described here.
There almost a hundred of test types, but the most commons are :
- Unit Test
- API Test
- Component Test
- Service Test
- Technical Acceptance Test
- Exploratory Test
- Penetration Test
- Performance Test
Unit tests are very low level, close to the source of your application. They consist in testing individual methods and functions of the classes, components or modules used by your software. Unit tests are in general quite cheap to automate and can be run very quickly by a continuous integration server.
On a Web Service Architecture, any web service must tested, and here a web service expose an API. If it’s not a web based API, API would likely be exposed on another protocol (websocket, TCP, UDP, etc.), so it doesn’t matter what the protocol is, the API should be tested.
It is also called as module testing. The basic difference between the unit testing and component testing is in unit testing the developers test their piece of code but in component testing the whole component (composition of classes, functions and procedures) is tested.
There is no much difference between Component and Service test as a server may be a component. On a multi-layer architecture, we could refer this to the service layer, so any service should be tested. On a Service Oriented Architecture, any service should be tested. On a Web Service Architecture, any web service must tested, and here a web service expose an API, so finally it’s an API test.
Technical Acceptance Tests
Acceptance tests are formal tests executed to verify if a system satisfies its business requirements. They require the entire application to be up and running and focus on replicating user behaviours. But they can also go further and measure the performance of the system and reject changes if certain goals are not met.
Exploratory Testing is an approach that is concisely described as simultaneous learning, test design and test execution. While the software is being tested, the tester learns things that together with experience and creativity generates new good tests to run. Exploratory testing is often thought of as a black box testing technique, and all of this is done manually at first.
It is a type of testing performed by a special team of testers. A system can be penetrated by any hacking way.
Security Testing is done to check how the software or application or website is secure from internal and external threats. This testing includes how much software is secure from the malicious program, viruses and how secure and strong the authorisation and authentication processes are.
It also checks how software behaves for any hackers attack and malicious programs and how software is maintained for data security after such a hacker attack.
Performance tests check the behaviours of the system when it is under significant load. These tests are non-functional and can have the various form to understand the reliability, stability, and availability of the platform. For instance, it can be observing response times when executing a high number of requests, or seeing how the system behaves with a significant of data.
Performance tests are by their nature quite costly to implement and run, but they can help you understand if new changes are going to degrade your system.
Spike test is a sub type of a performance test. Here we test an extreme increase or decrease in load. The goal is to determine the robustessness of an application when it receives extreme variations in traffic.
Smoke tests, also known as “Build Verification Test”, are basic tests, thus non-exhaustive set of tests that check basic the most important functionalities of the application. They are meant to be quick to execute, and their goal is to give you the assurance that the major features of your system are working as expected. The result of this testing is used to decide if a build is stable enough to proceed with further testing.
Smoke tests can be useful right after a new build is made to decide whether or not you can run more expensive tests, or right after a deployment to make sure that the application is running properly in the newly deployed environment. A Smoke test can be performed manually or can be automated.
This testing is done when a system is stressed beyond its specifications in order to check how and when it fails. This is performed under heavy load like putting large number beyond storage capacity, complex database queries, continuous input to the system or database load.
It is a type of non-functional testing and the objective of Load testing is to check how much of load or maximum workload a system can handle without any performance degradation.
Load testing helps to find the maximum capacity of the system under specific load and any issues that cause the software performance degradation. Load testing is performed using tools like JMeter, LoadRunner, WebLoad, Silk performer etc.
The system is tested with a load extended over a significant amount of time, to analyse the behaviour of the system under sustained mode. This type of testing is performed at the last stage of performance run cycle. It ensures that the application is capable enough to handle the extended load without any deterioration of response time.