Ethickfox kb page with all notes
Visual mythaphor for understanding that more isolated tests are faster and "cheaper", so they should be used more than slover services tests which should be used more than even mslower UI tests.
Оригинальная пирамида тестов состоит из трёх уровней:
Из этой пирамиды главное запомнить два принципа:
Тестируют отдельные модули или компоненты программного обеспечения(тестирование белого ящика) Должны составлять основную часть авто тестов. Цель состоит в том, чтобы проверить, что каждая единица программного кода работает должным образом. В идеале должны проверять каждый возможный блок кода, со всеми ветвлениями и тд. Фреймворки - Junit, Mockito.
Тестирование группы взаимодействующих модулей(тестирование черного ящика) - mockMvc
There are several different types and approaches for integration testing:
The integration test suite can check various things:
Тестирование системы в целом.(Selenium) должны размещаться на вершине пирамиды. Большая часть вашего кода и бизнес-логики должна быть уже протестирована до этого уровня;
API tests include testing of functionality, reliability, performance, and security of APIs. Depending on the approach, you can carry out API testing at various stages and in different ways:
API testing has various methods. Here are some of the top methods:
Интеграционные проверяют взаимодействие компонентов, а юнит - компоненты по отдельности
Even though they are not the same thing, API testing is a type of integration testing.
However, it is easy to confuse them as the core working of both tests is quite similar. Both tests ensure that different components integrate with the software and function properly.
But here are some key differences.
| API Testing | Integration Testing |
| Tests the functionality and performance of APIs. | Tests the interaction between different components of an application. |
| Automated testing performed early in the development cycle. | Testing performed after unit testing and before system testing. |
| Focuses on the behavior of the API for a given input. | Focuses on how different modules or services interact with each other. |
| Typically tests individual APIs in isolation. | Tests the parts of the system. It can check API, database, business logic, and integration with external resources. |
| Only usable for testing APIs that are part of a larger system. | Can be used for testing a wide range of applications, including desktop, web, and mobile applications. |
Позволяет проверить такие нефункциональные требования к системе, как производительность, стабильность, масштабируемость, стрессо- и отказоустойчивость.
Разобраться в документации и функциональности тестируемого продукта, составление и выполнение тестовых сценариев
Smoke Testing is done whenever the new functionalities of software are developed and integrated with existing build that is deployed in QA/staging environment. It ensures that all critical functionalities are working correctly or not.
| Smoke Testing | Regression Testing |
| Smoke Testing Is Used To Check If A Build Of The Software Is Stable Enough For It To Be Tested. | Regression Testing Is Used To Verify If Any Recent Changes Have Impacted The Existing Functionality. |
| It Is Employed By Both Software Testers And Developers. | It Is Predominantly Used By Software Testers Alone. |
| It Is A Surface-Level Type Of Testing As It Is Focused Only On Certain Modules And Performed On Initial & Unverified Builds. | It Is A More In-Depth Type Of Testing As It Has An End-To-End Approach And Is Performed Only On Stable Builds. |
| Smoke Testing Is Always Done Before Regression Testing. | Regression Testing Is Performed During Various Phases Of Testing. |
| It Doesn’t Require Much Time Or Resources To Be Done. | It Requires A Lot Of Time, Resources, And Effort To Be Done. |
| It Is Purely An Acceptance Type Of Testing As It Validates The Build And Prevents Further Testing If It Doesn’t Pass. | Though Functionalities Are Tested, It Is Not A Purely Acceptance-Based Type Of Testing As Any Issues Found In This Phase Don’t Prevent The Application From Being Further Tested. |
| Smoke Testing Definitely Requires Documentation | Regression Testing May Or May Not Require Documentation Based On The Need. |
The main purpose of Sanity testing is to verify that the changes or the proposed functionality are working according to plan. Suppose there are minor changes to be made to the code, the sanity test further checks if the end-to-end testing of the build can be performed seamlessly. However, if the test fails, the testing team rejects the software build, thereby saving both time and money.
Functional testing is a type of testing that seeks to establish whether each application feature works as per the software requirements. Each function is compared to the corresponding requirement to ascertain whether its output is consistent with the end user's expectations.
Testing is a software testing methodology that verifies the working order of a software product in a start-to-finish process. End-to-end testing verifies that all components of a system can run under real-world scenarios.
End-to-end testing is typically performed by quality assurance (QA) teams, and are executed in dedicated test environments. This normally takes place after functional and system testing. End-to-end testing starts from the user's perspective, simulating typical operations the application can perform.
There are two types of end-to-end testing: horizontal and vertical.
Horizontal end-to-end testing is the most used and well-known approach. Horizontal testing can build confidence in a system by assuming the perspective of a user. Horizontal testing confirms whether a user can navigate through a system, if it works as expected and if there are any unexpected bugs or exceptions.
Vertical end-to-end testing refers to testing in layers, meaning tests happen in a sequential, hierarchal order. Each component of a system or product is tested from start to finish ensuring quality. Vertical testing is frequently used to test critical components of a complex computing system that do not typically involve users or interfaces. A layer without a user interface (UI) would benefit from vertical end-to-end testing over horizontal.
Test Double is a generic term for any case where you replace a production object for testing purposes. There are various kinds of double:
Mocks
are pre-programmed with expectations which form a specification of the calls they are expected to receive. They can throw an exception if they receive a call they don't expect and are checked during verification to ensure they got all the calls they were expecting.