<aside> ☝
I like this definition https://www.atlassian.com/continuous-delivery/software-testing/types-of-software-testing
</aside>
Testing a single status-go package. Mocking other packages.
We have some unit tests in status-go
. Not many though.
Unit tests are very low level and close to the source of an application. They consist in testing individual methods and functions of the classes, components, or modules used by your software. Unit tests are generally quite cheap to automate and can run very quickly by a continuous integration server.
Testing how multiple status-go packages together.
Most of the tests now in status-go
are integration tests.
Integration tests verify that different modules or services used by your application work well together. For example, it can be testing the interaction with the database or making sure that microservices work together as expected. These types of tests are more expensive to run as they require multiple parts of the application to be up and running.
Testing specific features of status-go
, considering it as a black box. Preferably using same API as status-desktop
and status-mobile
.
This is currently the RPC tests that are running with make run-integration-tests
*Functional tests focus on the business requirements of an application. They only verify the output of an action and do not check the intermediate states of the system when performing that action.
There is sometimes a confusion between integration tests and functional tests as they both require multiple components to interact with each other. The difference is that an integration test may simply verify that you can query the database while a functional test would expect to get a specific value from the database as defined by the product requirements.*
Testing the complete application, involving status-desktop
and status-mobile
.
We have such tests in desktop and mobile.
*End-to-end testing replicates a user behavior with the software in a complete application environment. It verifies that various user flows work as expected and can be as simple as loading a web page or logging in or much more complex scenarios verifying email notifications, online payments, etc...
End-to-end tests are very useful, but they're expensive to perform and can be hard to maintain when they're automated. It is recommended to have a few key end-to-end tests and rely more on lower level types of testing (unit and integration tests) to be able to quickly identify breaking changes.*
status-go