inventaire-client
inventaire-client copied to clipboard
add integration tests
setting up a PhantomJS-based script (I know some libs are doing just that but can't find them back) to test the different user scenarios:
- creating a user
- adding an item etc.
found it: http://casperjs.org/
some resources:
- Frameworks for End-to-End Web Testing
- frontend testing
- ghostinspector
- against automated tests (Dale Emery's response)
another candidate: https://github.com/cypress-io/cypress
Two open source modern libraries to test the frontend (almost) like a black box:
- https://taiko.dev/ by ThoughtWorks
- https://playwright.dev/ by Microsoft
@Em-AK any opinion on Cypress and how the libs you suggested compare to it?
Feedback from cypress exploration (see branch cypress-init):
- easy install and general config
- learning curve topped when having to learn
cy.
DSL. Since "Cypress anticipates the asynchronous nature of web applications". Switching mentally from Promise model to Cypress might take some time. ie. Storing callbacks easily with await is not advisable in Cypress "You rarely have to ever use const, let, or var in Cypress" - debugger (
.debug()
) worked well - Selectors picked Cypress studio seemed messed up by Svelte (
svelte-*
classes) - Cypress studio configuration is scarce, and i couldnt find a way to integrate a post-process script (to clean up former point)
I would be for testing other tools before picking one.
Playwrite is the other hype one these days it seems: