IssueRaiser

Make test name available in beforeEach() and afterEach()

## πŸš€ Feature Proposal Make test name available in `beforeEach()` and `afterEach()`. ## Motivation When running Selenium tests it's helpful to take a screenshot after every test. Best name for those files would be the test name. Now I use url and timestamp, which are not that good. For further logging purposes `beforeEach()` could use the test name too, to log when that test starts. It makes easier to search server logs from the same time. ## Example ```javascript afterEach(async (testName) => { await saveScreenshot(testName); log(`Test '${testName}' ended at ${getTime()}`); }); ```

Posted by tapioko on Feb 1, 2019, 12:25 PM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.4,000 issues0 comments

github (Sysadmin)

Make test name available in beforeEach() and afterEach()

tapiokoFeb 1, 2019, 12:25 PM

## πŸš€ Feature Proposal Make test name available in `beforeEach()` and `afterEach()`. ## Motivation When running Selenium tests it's helpful to take a screenshot after every test. Best name for those files would be the test name. Now I use url and timestamp, which are not that good. For further logging purposes `beforeEach()` could use the test name too, to log when that test starts. It makes easier to search server logs from the same time. ## Example ```javascript afterEach(async (testName) => { await saveScreenshot(testName); log(`Test '${testName}' ended at ${getTime()}`); }); ```

Comments (0)

No comments yet. Start the discussion.

Comment on this issue