Rodzaje testów

Bartosz Krajka 2019

Agenda

  1. Jednostkowe
  2. Integracyjne
  3. Systemowe
  4. Akceptacyjne
  5. End to end
  6. Piramida testów
  7. Smoke tests
  8. Regresyjne
  9. Black-box
  10. White-box
  11. Manualne / automatyczne

Testy jednostkowe

Testy jednostkowe (unit tests)

A software testing method by which individual units of source code, sets of one or more computer program modules together with associated control data, usage procedures, and operating procedures, are tested to determine whether they are fit for use.

Testy jednostkowe (unit tests)

A software testing method by which individual units of source code, sets of one or more computer program modules together with associated control data, usage procedures, and operating procedures, are tested to determine whether they are fit for use.

Testy jednostkowe (unit tests)

A unit test provides a strict, written contract that the piece of code must satisfy.

A software design technique that emphasizes separating the functionality of a program into independent, interchangeable modules

Testy jednostkowe (unit tests)

24 definitions

  • low-level
  • written by programmers themselves
  • significantly faster than other tests

Testy jednostkowe (unit tests)

Propozycja

  • Nie definiujmy testu jednostkowego bez definiowania (wskazania) modułu
  • Definicja będzie różna dla różnych przypadków i projektów

Testy integracyjne

Testy integracyjne (integration tests)

Integration tests determine if independently developed units of software work correctly when they are connected to each other.

Testy integracyjne (integration tests)

Board vs Narrow Integration Tests

Testy systemowe

Testy systemowe (system tests)

System testing is testing conducted on a complete integrated system to evaluate the system's compliance with its specified requirements.

 

Software testing is an investigation conducted to provide stakeholders with information about the quality of the software product or service under test.

System testing means testing the system as a whole.

Testy akceptacyjne

Testy akceptacyjne (acceptance tests)

An acceptance test is a formal description of the behavior of a software product, generally expressed as an example or a usage scenario.

 

The terms "functional test", "acceptance test" and "customer test" are used more or less interchangeably.

 

"Acceptance test" ~ "Acceptance criteria"

Testy akceptacyjne (acceptance tests)

End to end tests

End to end tests

End-to-end testing is a Software testing methodology to test an application flow from start to end.

 

The purpose of End to end testing is to simulate the real user scenario and validate the system under test and its components for integration and data integrity.

End to end tests

Horizontal vs vertical end to end testing

End to end tests

Vertical end to end test = system test

 

Horizontal end to end test is more than that (~ User Journey Test)

Piramida testów

Test Pyramid (piramida testów)

Test Pyramid (piramida testów)

  1. Write tests with different granularity
    1. unit tests
    2. integration tests
    3. system tests
  2. The more high-level you get the fewer tests you should have

Smoke tests

Smoke tests

A.K.A confidence testing, sanity testing.

 

Preliminary testing to reveal simple failures severe enough to, for example, reject a prospective software release.

Testy regresyjne

Testy regresyjne (regression tests)

A type of software testing to confirm that a recent program or code change has not adversely affected existing features.

 

Testy antyregresyjne?!

 

Zasada: Każdy bug zwieńzczyć testem żeby uniknąć regresji

Black-box tests
White-box tests

Black-box tests

Examines the functionality of an application without peering into its internal structures or workings.

 

Tests what, not how.

 

This method of test can be applied virtually to every level of software testing: unit, integration, system and acceptance.

 

It is sometimes referred to as specification-based testing.

White-box tests

Tests internal structures or workings of an application, as opposed to its functionality 

 

Techniques (examples):

  • Code coverage
  • Fault injection methods
  • Mutation testing methods

 

Automatyczne testy
Manualne testy

Testy automatyczne / manualne

Unit testing is commonly automated, but may still be performed manually. The IEEE does not favor one over the other.

 

Zawód testera

 

Automatyczne testy umożliwiają CI / CD

Testy automatyczne / manualne

Zawód testera

 

Nie wszystko da się zautomatyzować.

 

I automatyzacja bywa kosztowna, i niesie ryzyko.

-> automated chaos is still chaos

Testy automatyczne / manualne

Q&A

Made with Slides.com