Competent
- Automated testing concept
- Functional testing concept
- Integration testing concept
- End-to-end testing concept
- Test driven development concept
- Performance testing concept
- Test automation framework concept
- Behavior-Driven Development
Automated testing concept
Автоматизированное тестирование программного обеспечения — часть процесса тестирования на этапе контроля качества в процессе разработки программного обеспечения. Оно использует программные средства для выполнения тестов и проверки результатов выполнения, что помогает сократить время тестирования и упростить его процесс.
Существует два основных подхода к автоматизации тестирования: тестирование на уровне кода и тестирование пользовательского интерфейса (в частности, GUI-тестирование). К первому типу относится, в частности, unit tests. Ко второму — имитация действий пользователя - функциональное тестирование (с помощью специальных тестовых фреймворков.)
- Утилиты записи и воспроизведения
- Написание сценария
- правляемое данными тестирование
- Тестирование по ключевым словам
например, Selenium
Functional testing concept
Ensure that the app works as expected from the user’s perspective. Assertions primarily test the user interface.
Functional testing is a type of software testing whereby the system is tested against the functional requirements/specifications.
Functional tests feed input to the user interface, and make assertions about the output that ensure that the software responds the way it should.
Functional testing does not imply that you are testing a function (method) of your module or class. Functional testing tests a slice of functionality of the whole system. Functional testing "verifies a program by checking it against ... design document(s) or specification(s)"
Functions (or features) are tested by feeding them input and examining the output. Functional testing ensures that the requirements are properly satisfied by the application. This type of testing is not concerned with how processing occurs, but rather, with the results of processing. It simulates actual system usage but does not make any system structure assumptions.
During functional testing, Black Box Testing technique is used in which the internal logic of the system being tested is not known to the tester.
Functional testing is more effective when the test conditions are created directly from user/business requirements
Types:
- Smoke testing
- Regression testing
- Sanity testing
- Usability testing
Steps:
- Identify functions that the software is expected to perform
- Create input data based on the function’s specifications
- Determine the output based on the function’s specifications
- Execute the
test case - Compare the actual and expected outputs
Integration testing concept
Integration testingis a level of software testing where individual units are combined and tested as a group.
Ensure that component collaborations work as expected. Assertions may test component API, UI, or side-effects (such as database I/O, logging, etc…)
The purpose of this level of testing is to expose faults in the interaction between integrated units. Test drivers and test stubs are used to assist in Integration Testing.
Testing performed to expose defects in the interfaces and in the interactions between integrated components or systems.
End-to-end testing concept
for JS - Cypress, Nightwatch
End-to-end testing is a technique used to test whether the flow of an application right from start to finish is behaving as expected. The purpose of performing end-to-end testing is to identify system dependencies and to ensure that the data integrity is maintained between various system components and systems.
The entire application is tested for critical functionalities such as communicating with the other systems, interfaces, database, network, and other applications.
Test driven development concept
Test-driven development starts with developing test for each one of the features. The test might fail as the tests are developed even before the development. Development team then develops and refactors the code to pass the test.
Test-driven development is related to the test-first programming evolved as part of extreme programming concepts.
Test-Driven Development Process:
- Add a Test
- Run all tests and see if the new one fails
- Write some code
- Run tests and Refactor code
- Repeat
Performance testing concept
Performance testing
Performance testing, a non-functional testing technique performed to determine the system parameters in terms of responsiveness and stability under various workload. Performance testing measures the quality attributes of the system, such as scalability, reliability and resource usage.
Load testing - It is the simplest form of testing conducted to understand the behaviour of the system under a specific load. Load testing will result in measuring important business critical transactions and load on the database, application server, etc., are also monitored.
Stress testing - It is performed to find the upper limit capacity of the system and also to determine how the system performs if the current load goes well above the expected maximum.
Soak testing - Soak Testing also known as endurance testing, is performed to determine the system parameters under continuous expected load. During soak tests the parameters such as memory utilization is monitored to detect memory leaks or other performance issues. The main aim is to discover the system's performance under sustained use.
Spike testing - Spike testing is performed by increasing the number of users suddenly by a very large amount and measuring the performance of the system. The main aim is to determine whether the system will be able to sustain the workload.
Tools
- Jmeter -
http://jmeter.apache.org/ - Open STA -
http://opensta.org/ - Load Runner -
http://www.hp.com/ - Web Load -
http://www.radview.com/
Test automation framework concept
A test automation framework is an integrated system that sets the rules of automation of a specific product. This system integrates the function libraries, test data sources, object details and various reusable modules. These components act as small building blocks which need to be assembled to represent a business process. The framework provides the basis of test automation and simplifies the automation effort.
- Selenium
- Cucumber
- Appium - for mobile
Behavior-Driven Development
BDD framework: Jasmine
BDD (Behavior-driven development, «разработка через поведение») — это методология разработки программного обеспечения, являющаяся ответвлением от методологии разработки через тестирование (TDD).
BDD не предоставляет каких-либо формальных правил, но настаивает на том, чтобы использовался ограниченный стандартный набор фраз, который включал бы все элементы спецификации поведения. В 2007 году Дэном Нортом был предложен шаблон для спецификации, который получил популярность и впоследствии стал известен как язык Gherkin:
| Ключевое слово на английском языке | Русскоязычная адаптация | Описание |
|---|---|---|
| Story (Feature) | История | каждая новая спецификация начинается с этого ключевого слова, после которого через двоеточие в сослагательной форме пишется имя истории |
| As a | Как (в роли) | роль того лица в бизнес-модели, которому данная функциональность интересна |
| In order to | Чтобы достичь | в краткой форме какие цели преследует лицо |
| I want to | Я хочу, чтобы | в краткой форме описывается конечный результат |
| Scenario | Сценарий | каждый сценарий одной истории начинается с этого слова, после которого через двоеточие в сослагательной форме пишется цель сценария. Если сценариев в одной истории несколько, то после ключевого слова должен писаться его порядковый номер |
| Given | Дано | начальное условие. Если начальных условий несколько, то каждое новое условие добавляется с новой строки с помощью ключевого слова And |
| When | Когда | (прим.: что-то происходит) Событие, которое инициирует данный сценарий. Если событие нельзя раскрыть одним предложением, то все последующие детали раскрываются через ключевые слова And и But |
| Then | Тогда | результат, который пользователь должен наблюдать в конечном итоге. Если результат нельзя раскрыть одним предложением, то все последующие детали раскрываются через ключевые слова And и But |
| And | И | вспомогательное ключевое слово, аналог конъюнкции |
| But | Но | вспомогательное ключевое слово, аналог отрицания |
Example
Story: Returns go to stock
As a store owner
In order to keep track of stock
I want to add items back to stock when they're returned.
Scenario 1: Refunded items should be returned to stock
Given that a customer previously bought a black sweater from me
And I have three black sweaters in stock.
When they return the black sweater for a refund
Then I should have four black sweaters in stock.
Scenario 2: Replaced items should be returned to stock
Given that a customer previously bought a blue garment from me
And I have two blue garments in stock
And three black garments in stock.
When they return the blue garment for a replacement in black
Then I should have three blue garments in stock
And two black garments in stock.
Cucumber is a testing framework for behavior driven development. It works by allowing you to define your tests in Gherkin form, and makes these gherkins executable by tying them to code.