Skip to content

Testing Pyramid

Devrath edited this page Jul 4, 2021 · 4 revisions

testing pyramid

How are these types of tests differ from each other

  • Not all the types of tests are easy to test 😟, especially the tests that depend on android framework.
  • So the idea is to separate the types of tests so that all these different types of tests can be individually be tested.

Types of tests from the testing pyramid

  • Unit Test-> This comprises the bulk of the testing, Here we test all the fundamental blocks.
  • Integration Test-> Here we test how the units interact with each other.
  • EndToEnd Test or UI Test-> Here there are a few handfuls of tests that check how the whole system works.

---- > First we write the Unit testsand that includes most of the building blocks of the code that include business logic->Then we write the integration tests that test the interaction between the logics-> Finally we perform the EndToEnd test that is used to check how the system works as a whole

Unit Tests

  • They constitute the bulk of our tests.
  • These are the tests that are most often run on a regular basis.
  • It can be things like writing tests on a function that accepts two integers and calculates the sum of both values.
  • This can be called the simplest unit function.

Integration Tests

  • As mentioned here we test how the units interact with each other
  • One such scenario is how a fragment interacts with view-model and everything works fine when this happens.
  • There is a difference between Integration Tests and Integrated Tests
    • Integration Tests are described above.
    • Integrated Tests are those tests that rely on android components like resources of application such as strings etc..

EndToEnd Tests

  • These are the tests that test the user journey of a functionality.
  • They have to run on an android emulator or device
Clone this wiki locally