ualibweb / ui-calendar

FOLIO institutional calendar UI module
Apache License 2.0
1 stars 0 forks source link

Investigate Preferred Testing for new Frontend Modules #5

Closed ncovercash closed 3 years ago

ncovercash commented 3 years ago

The existing use of bigtest is extremely deprecated (abandoned by the authors of bigtest and FOLIO).

The FOLIO project has moved through multiple testing systems -- the purpose of this issue is to figure out what the preferred one for new FE modules is.

ncovercash commented 3 years ago

Per Zak Burke (lead dev of stripes-core, stripes-components, and many others):

In the beginning, we had no tests :scream: Frontside was inventing BigTest v0.1.0 and we picked it up. Frontside abandoned BigTest v0.1.0 for v1.0.0 and we were kinda screwed. :poop: It took us a little while to settle on rtl/jest and some folks did some cypress work in the mean time.

We did migrate stripes-components to BigTest v1.0.0 because we like testing components in real browsers, rather than jest-dom. And there are plans to build end-to-end tests with BigTest v1.0.0 using the Cypress test-runner but that’s just getting started.

e2e tests are great for automating things like bugfest (our regular end-of-release, test-all-the-things sprint) so we can reduce the manual effort there, but for various reasons they’re not great for running on every PR, for example, whereas unit tests are perfect for that. So we write jest/rtl test and run them in our CI/CD env on each PR, and use them to generate a test-coverage report, which doubles as a swag for “is the module healthy?”

It seems the current move is to use rtl and jest for static/DOM-based testing. E2E is much less necessary at this point and there are still some overarching decisions on what should be used for it, so the rtl/jest should be sufficient.

ncovercash commented 2 years ago

Found some docs in https://wiki.folio.org/pages/viewpage.action?spaceKey=DQA&title=Folio+Module+Testing+Guidelines