Javascript test development [Chapter 0: Introduction]

in #palnet5 years ago

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.


Taked from giphy.com

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
  • Jenkins

Although in this series of articles I am not going to tell you about these tools, it is important to keep them in mind when you have performed your javascript tests and want to execute them in the deployment process.


Already entering a little more in the matter, the purpose of this series of articles was born through the little information that I have found on the internet regarding javascript tests. For this reason I will develop a series of topics to talk about the frontend side tests:

Topics

  1. 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.

  2. ¿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.

  3. Unit testing: Unit tests represent tests on functionalities that are not affected by others, for example: test a addition function.

  4. 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.

  5. 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.

  6. Angular test: Here I'll talk about the development of Angular tests.

  7. React test: Here I'll talk about the development of React tests.

  8. 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.

Sort:  

Hey @cunigarro!
We noticed you like games so we have a small gift! 🎁
1 STEEM is waiting for you at SteemSlotGames.com!

To claim your gift visit our website, log in with your Steem account and use the 1 STEEM we have added to your account. We use SteemConnect for login and transactions, so all your keys remain 100% private.

On SteemSlotGames.com you can win STEEM in slot games, dice, and roulette. Soon we are planning to release more classic games that will provide the community with a lot of fun!

We hope you don't mind this comment and you will accept our invitation! 😉

GOOD LUCK & HAVE FUN! 😎

This post earned a total payout of 0.055$ and 0.041$ worth of author reward which was liquified using @likwid. To learn more.