Why do we need Test, and what is Jest??

Alice Richardson
3 min readDec 22, 2020

--

Why do we need to test?

The advantage of writing tests is

  • to make you confident of your own code.
  • easy for future change and refactor.

There are many levels of writing tests, whether it is Unit Test, Integration Test, UI Test, E2E Test, etc. Unit Test is the easiest part to test and will save as much time as possible. So if anyone sees it as a waste of time at least you need to write Unit Test.

Also, there are a lot of ways to write tests, such as TDD, BDD, ATDD, etc. How the test is going to be written will depend on the team, there are many factors.

What is the test case?

A test case is a case used in testing, in which a test case is based on the business requirement given by the customer.

Types of testing

  1. Unit Test is to write a test in a small part of the program to show that it works as it should. It should be simple, easy, and quick, and only checks the parts that the programmer wants to test.
  2. Integration Testing is intended to show that the existing systems work well together by writing this level of testing to cover the entire application and require cooperation from many parts. For example, if a system has a database and API, then we also need a database and API to test. The goal of writing this level of the test is to show other non-programmers that all systems are compatible.
  3. User Acceptance Testing is the last step of a system testing process to ensure that the user accepts the test. The system that is developed is ready to be used. To meet the business process and the requirements of the user, the test results must meet the system integrity conditions that should be and can be accepted. Which was jointly established between users and the development team, as well as other departments Related

How to test?

  1. Manual Test is a test performed without an automated tool or Script, where the tester will run the test according to the test plan, test case, or test scenarios.
  2. Automation Test is to create a script to test the quality of the software, which runs fast and can re-run any number of laps without having the user manually put the data all the time, but it needs to be maintained to meet the requirements of the software.

Now I am going to introduce you to Jest.

Jest is a test authoring tool (Testing) JavaScript Framework developed by Facebook.

It can work with projects like Babel, TypeScript, Node, React, Angular, Vue, and more.

Advantage from jest

  • Fast and safe
  • snapshots testing makes sure our UI doesn’t change suddenly.
  • Tests will run in parallel. (Parallelized) greatly increases the speed of work. More importantly, you don’t have to use a browser like Karma.
  • Able to view CODE COVERAGE without an additional installation.
  • great API: Jest has all the tools in one place and well documented so it’s easy to use.

I hope this blog can help you understand why we need to test and basic about jest testers.

--

--

Alice Richardson
Alice Richardson

Written by Alice Richardson

Software Development with a background designer.

No responses yet