Surely working in a development team have felt that at some point you send a change to production and still when we are 100% sure that everything will be fine, in the end something fails. This is where we wonder if we are testing our application well before sending any changes to production or if the rest of the team is going to want to kill you.
Luckily there is something called continuous integration which is that every time you send changes to production a series of automatic tests that evaluate the most important functionalities of your application are executed and if any of these fail, it is not deployed to production, indicating that your code is breaking some other functionality.
There are several tools that will help us to run a complete set of tests. These tools are:
- Circle CI
- Travis CI
- TDD o Test Driven Development: This methodology suggests that the development of a functionality is carried out first under the premise of a test. First we create a very basic test on a functionality that does not exist, then we create the functionality with the minimum necessary to comply with the test, then we refactor the functionality with all the complete requirement and verify that the test is fulfilled in all possible scenarios.
- ¿What should I test in an application?: Developing tests is not something that takes a short time, therefore it is not necessary to test an entire application and it is good to know how we can test certain functionalities. In this section we will learn to know what test and how test it.
- Unit testing: Unit tests represent tests on functionalities that are not affected by others, for example: test a addition function.
- Integration test: Integration tests refer to functionalities that are affected by others, for example, in order to calculate the mode in statistics, the functionality of division, addition, subtraction and multiplication is necessary.
- Test e2e (end to end): The tests end to end refers to the tests that are executed simulating user actions. Here it is not a question of functionalities that depend solely on the code, but on simulating the filling of a form, the click on a button, the appearance of a text. This type of test will allow us to basically test the actions that the user develops in an application.
- Angular test: Here I'll talk about the development of Angular tests.
- React test: Here I'll talk about the development of React tests.
- Vue test: Here I'll talk about the development of Vue tests.
I hope you will accompany me on this new path since I would like to start working on frontend development issues rarely seen on the internet.
Greetings to all our Frontends.