Equal-Vote / star-server

STAR Voting is an upgrade to our current way of voting that allows voters to score candidates from 0 to 5. Ultimately, STAR Voting elects candidates who better represent the whole of the electorate. We are building a site that lets everyone from individuals to organizations use STAR Voting to host simple polls or run secure elections.
GNU Affero General Public License v3.0
10 stars 20 forks source link

Investigate UI Integration testing tools #251

Open ArendPeter opened 1 year ago

ArendPeter commented 1 year ago

Testing Strategy

After some research, here's all the testing I think we should support:

Deployment Production
Front End jest + react-testing + mirage -
Back End jest unit tests monitoring (infrastructure + api tests)

Front End Tests

Here's the tools I think we should use for the UI testing

Resources

react-testing Resources

Dave Farley Vidoes:

Misc

Appendix A: Mock backend? or test End-to-End

Question: Do we want to mock out the server to isolate the UI in our tests? or should we see these as end to end tests? It would be kind of messy to constanly recreate and delete test data, but maybe that's fine for the dev environment

Looks like it was answered in the comment thread of the mirage video

image

and this video backs it up argument https://www.youtube.com/watch?v=QFCHSEHgqFE

Appendix B: What happened to Cucumber and Gherkin?

I initially planned to use cucumber here so that I could leverage gherkin , and create the tests in a more BDD fashion (bdd-vid1, bdd-vid2).

I still want to use BDD but getting cucumber + gherkin to work with js seemed a bit too clunky (based on what I saw in this article).

I can still use a BDD approach as described in this video

ArendPeter commented 4 months ago

I gave up on this at the time, but it could be good to consider again after the official release