garris / garris/BackstopJS

Is there a cleanup hook that can be used to log out of the web service being tested?

Open
#1,320 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
7.2k
Forks
621
PR merge metrics
No merged PRs in 30d

Description

Greetings,

I'd like to run scenarios against a web app that requires login before the test can commence.
No worries, the onReady.js hooks deals with this.

The problem is that the web app keeps records of user sessions (combo of userId + session id) and only allows max 10 sessions per user. After that it's not possible to log on => not possible to run tests.
So I need to log out when tests are done.

A clean solution would be to log out in a cleanup function, but there doesn't seem to be any such hooks... or?

I thought about driving Backstop from a Node.js app, but I don't think the browser instance created by Backstop exists after the test initiated in the Node.js app is complete.

Ideas/suggestions?

Thanks!

Contributor guide

Open the contributing guide

Research direction

Start by reading the onReady.js hook and the lifecycle that creates and disposes the browser instance. Determine whether a cleanup hook can run after scenarios complete and whether it can access that instance. Done means the supported lifecycle and cleanup behavior are defined, with the issue's logout use case addressed or clearly documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
testing-qa
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.