CodenameTim,
@CodenameTim@fosstodon.org avatar

When running an end to end test for your live application, does the test runner have access to the database or is it an entirely separate process?

LucidDan,

@CodenameTim no access for prod or pre-prod testing - I find having db access makes me lazy in my assertions. The user should be able to verify the results of their actions via the UI so my tests should too…other than rare corner cases, it’s prob better to avoid the temptation to use the db directly.

That having been said, for me (pre-)production tests are minimal and for verifying; most of my end to end testing is done in CI via a liveserver, and pytest has full access to db at that stage

programmylife,
@programmylife@fosstodon.org avatar

@CodenameTim separate process for me. I can give you more details in person at Djangocon.

CodenameTim,
@CodenameTim@fosstodon.org avatar

@programmylife 🥳 🐂 📚

b0uh,

@CodenameTim I’m working with playwright at work for end to end testing and it does not have access to the DB. We have have created some API endpoints specifically to setup some data for E2E test though. Those endpoints are called directly by playwright.

CodenameTim,
@CodenameTim@fosstodon.org avatar

@b0uh I think that's what we're going to settle on as well.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • django
  • DreamBathrooms
  • mdbf
  • ethstaker
  • magazineikmin
  • GTA5RPClips
  • rosin
  • thenastyranch
  • Youngstown
  • InstantRegret
  • slotface
  • osvaldo12
  • kavyap
  • khanakhh
  • Durango
  • megavids
  • everett
  • cisconetworking
  • normalnudes
  • tester
  • ngwrru68w68
  • cubers
  • modclub
  • tacticalgear
  • provamag3
  • Leos
  • anitta
  • JUstTest
  • lostlight
  • All magazines