kawalcovid19 / wargabantuwarga.com

Inisiatif warga untuk berbagi informasi seputar fasilitas kesehatan dan alat kesehatan untuk COVID-19.
https://www.wargabantuwarga.com
MIT License
555 stars 166 forks source link

Ensure unit, integration, and e2e testing best practices #688

Open zainfathoni opened 3 years ago

zainfathoni commented 3 years ago

Overview

There are a lot of non-recommended practices in our unit & integration tests, such as (not limited to):

All those practices potentially lead to regressions in the future by introducing false positives due to passing tests on breaking changes.

Testing Guidelines

In general, these are three guidelines that we need to pay attention to:

  1. Query priorities
  2. Testing appearance and disappearance
  3. Opting in for interactions instead of events

Current Tasks

General

Unit Testing / Integration Testing

E2E Testing

rubiagatra commented 3 years ago

@zainfathoni I updated the title and put all the lists about testing and e2e testing. Is that okay?

I will be focusing on that for this project. But, I little bit busy for 2 weeks until August 22. Can only visit the project on Sunday.

Maybe after that, I can have more time to help

zainfathoni commented 3 years ago

Okay, no problem. In the meantime, I'm working on #195 at #727 so that we can use it in our GitHub Actions CI.

rubiagatra commented 3 years ago

I think we will need to wait for #697 to be done before we can continue.

For #459 and #468 is that e2e testing? or still on unit/integration testing

@zainfathoni

zainfathoni commented 3 years ago

I think we will need to wait for #697 to be done before we can continue.

For the unit & integration tests, yes. I'll try to review it later tonight to unblock the rest of the issues. However, I think nothing blocks the e2e issues at the moment.

For #459 and #468 is that e2e testing? or still on unit/integration testing

Based on my classifications at #374, they are parts of integration testing. Do you think we need another label to segregate unit & integration tests from e2e tests, Mas @rubiagatra?

rubiagatra commented 3 years ago

I think yes mas @zainfathoni, RTL, and Cypress are in different categories. Even though they are closely related maybe testing for unit/integration test and e2e test for cypress related?.

I will update the description based on #374

zainfathoni commented 3 years ago

I think yes mas @zainfathoni, RTL, and Cypress are in different categories.

Even though they are closely related maybe testing for unit/integration test and e2e test for cypress related?.

Let's rename the label for unit & integration into unit & integration test to make them more specific and obvious for the contributors.

I will update the description based on #374

Thanks! 🙏

zainfathoni commented 3 years ago

Mas @rubiagatra, this epic becomes more important due to the upcoming migration here #783.

rubiagatra commented 3 years ago

Thank you for remind me mas @zainfathoni , will checkout this soon