This article provides a high level description of my attempts at using Cypress for integration testing in an a Django + VueJS app using GitLab CI. ...
For further actions, you may consider blocking this person and/or reporting abuse
@briancaffey Thanks for all of this (even though I am late to the game here).
I'm curious about what your python command
recreate_dbdoes. Is that a custom command or a library? What I'm struggling to do is figure out how to handle spinning up the database and shutting it down so that I can seed it from Cypress.Hi, it has been a while since I looked at this, but I think that
recreate_dbis from another repo I was referencing: github.com/testdrivenio/testdriven.... There is another line from my codedocker-compose -f docker-compose.ci.yml up -d --buildthat starts the database and runs migrations.I think I removed the
start_ci.shfile that is referenced bydocker-compose.ci.yml, but this is where the database migration command would have been called, as well as any other custom management command used to seed data. In this way, I'm seeding the database from docker-compose commands, not from Cypress. Did you want to seed the database from Cypress itself?Ugh, I accidentally reloaded the page after having a more thoughtful response here, ha. But know that your references helped.
I ultimately used a shell script to drop & recreate db, then a custom Django command to seed it using Django test factories already being used by an existing Selenium test suite.
Also, I should mention that I have recently done lots of refactoring on this project and I am actively working on restructuring some of the Cypress-related code. If you are looking at this repo: gitlab.com/verbose-equals-true/dja..., it might be good look at the files from a commit with a date close to the time that this article was published, and keep an eye on it for updates! Hopefully I'll be coming back to the Cypress tests soon.