question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How To Clear Output Folder That Saves The Failed Cases Snapshot

See original GitHub issue

I am running my test cases on client server Via Jenkins and I want that each time when I Run my Tests then Output folder is cleaned and then when tests finishes all those failed cases snapshots are attached and sent in Build Report Email

What do you get instead?

Provide console output if related. Use --verbose mode for more details.

# paste output here

Provide test source code if related

// paste test

Details

  • CodeceptJS version:
  • NodeJS Version:
  • Operating System:
  • Protractor || WebDriverIO || Nightmare version (if related)
  • Configuration file:
# paste suite config here

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
aesyonducommented, Nov 27, 2020

Here is how I did it for 3.0.2, in case someone comes here from search engine:

// codecept.conf.js
const rimraf = require("rimraf");
const outputFolder = "./test/e2e/bdd/.tmp";

exports.config = {
  // ... irrelevant code
  output: outputFolder,
  async bootstrap() {
    await new Promise((resolve, reject) => {
      rimraf(outputFolder, (err) => {
        if (err) {
          reject(err);
        } else {
          resolve();
        }
      });
    });
  },
  // ... irrelevant code
};

0reactions
schmkrcommented, Jan 2, 2019

🤔 Forget that, it seems doing this in the bootstrap function, the output dir is renamed during the run 😞

Read more comments on GitHub >

github_iconTop Results From Across the Web

How To Clear Output Folder That Saves The Failed Cases ...
Just add rm -rf tests/output/* before executing tests. And please don't spam in Twitter. That doesn't sound like a good manner.
Read more >
Tests wont run from build output folder when using runsettings ...
1 Answer · rename(or delete) the hidden . · Close all Visual Studio instances and open Developer Command Prompt for VS 2017 >...
Read more >
6 Working With SnapShot on the Development Client
Use the Delete button to remove a saved version (SnapShot). The Log File area displays the log file path and name. Use the...
Read more >
How to Capture Screenshot in Selenium for Failed Test Cases
How to capture screenshot for failed test cases in Selenium Webdriver ... save all screenshot in our project home directory and // result....
Read more >
Snapshots Management Tool | GridGain Documentation
The tool will search for snapshots in the default snapshot folder and the folders given in this argument. -verbose. The output will additionally...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found