DEV Community

Neha Sharma
Neha Sharma

Posted on • Updated on

Your Guide for Testing ReactJS Apps - Part 1

What is Testing

Testing is crucial for the engineers and every engineering team. Testing helps in gaining the confidence on the features devs are developing, and shipping. Gone are the days where we used to relay only on the testers for the testing and bugs.

Now, engineers are encouraged to write test-cases to avoid bugs and errors. This will increase the confidence of the developers in the product and shipping the code with quality.

Type of testing (React) & complexity

  1. Unit testing: Easy

  2. Snapshot : Easy and for UI

  3. Integration Testing: Medium

  4. End to end testing: Complex

Image description

Type of testing:

  1. TDD: Test driven development

  2. BDD: Behaviour driven development

Why testing

  1. Avoid bugs

  2. Gain confidence

  3. Proof of documentation

  4. Quality code

Library for test cases

There are 2 testing way: Assertion & test runner

  1. Jest

  2. Chai

  3. Mocha

  4. React Testing Library

  5. Puppeteer

  6. Playwright

  7. Airbnb

Autonomy of test case

Image description

Details

Image description

In next, blog we will get into the code. We will write our first test-case.

If you like this blog do follow me at Twitter

Top comments (3)

Collapse
 
asadanik profile image
Asad Anik

Thanks a Lot Neha 🥰🥰💖💁🏻💁🏻

Collapse
 
rajatmehra05 profile image
RAJAT MEHRA

Thank you for this Neha. Looking forward to this testing series. :D

Collapse
 
hellonehha profile image
Neha Sharma

Yes, 2nd is in draft and will be going live soon