yattex

2.3.0 • Public • Published

Yattex CLI based test tool

Commands to run:

  • npm install
  • In your test script add yattex
  • npm test

How it works.

We are using mocha js and jest for testing. For reporting we use mochawesome reporters and for jest we use Jest-stare.

when we start testing using this " npm test " user need to input custom test decorators on console and after this all the test case run and store results in .yattex/run-{timestamp} folder. All the work done on real time.

After test case completed our tool command, its generate .yattex folder and .yattex/run-${timestamp} folder. Inside .yattex/run-${timestamp} this folder add custom decorators list in decorators.json file. This tool also check if this project have a git then it create a git.json file and store git branch name and project name inside it.

In Cypress, to add screenshots to the Html report, add this on top of the cypress/support/e2e.js file

import addContext from "mochawesome/addContext";

After that add this block:

Cypress.on("test:after:run", (test, runnable) => {
  if (test.state === "failed") {
    const screenshot = `../../cypress/screenshots/${Cypress.spec.name}/${runnable.parent.title} -- ${test.title} (failed).png`;
    addContext({ test }, screenshot);
  }
});

Readme

Keywords

none

Package Sidebar

Install

npm i yattex

Weekly Downloads

0

Version

2.3.0

License

ISC

Unpacked Size

13.6 kB

Total Files

13

Last publish

Collaborators

  • repotest26