Code Monkey home page Code Monkey logo

prescript's Introduction

prescript

prescript is a Node.js-based test runner that helps make it fun to write end-to-end/acceptance tests.

Writing functional and end-to-end tests (e.g. using Puppeteer or Selenium) with unit-testing frameworks such as Mocha can sometimes be painful, because when one step failed, you have to re-run the test from the beginning to verify that you fixed it. End-to-end tests is usually very slow compared to unit tests.

prescript solves this problem by allowing you to express your tests as multiple, discrete steps. prescript then comes with an interactive development mode, in which you can hot-reload the test script and jump between steps.

This means as you run your tests as you write it. And if you make a mistake you can fix your test, hot reload, and continue testing, without having to re-run the whole test suite.

Documentation

Documentation is available on our website.

Development

Running Prescript example scenarios:

yarn test-examples

Running individual scenario:

./bin/prescript "./examples/calculator/tests/Basic addition (page object).js"

Running unit tests:

yarn test

prescript's People

Contributors

cerberus avatar chrisza4 avatar dependabot[bot] avatar dtinth avatar gitbook-bot avatar lukyth avatar rebasecop avatar thisismanta avatar zugarzeeker avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

prescript's Issues

Vorpal commands

  • inspect — show the current state

  • status — show the test plan and show what test to run next

  • continue — continue running until hitting an error

  • next — runs the next action

  • jump — jump to some step

  • reload — reload the test module

“Error: charData should not contain characters not allowed in XML” thrown when generating Allure result file and error message contains ANSI sequence.

We at @taskworld noticed that when the Error message contains an ANSI escape sequence (color codes), the allure result file would not be generated. Instead, this error message is printed out to the console:

09:14:54  /var/lib/jenkins/workspace/E2E/node_modules/xmlcreate/lib/nodes/XmlCharData.js:75
09:14:54                  throw new Error("charData should not contain characters not allowed"
09:14:54                        ^
09:14:54  Error: charData should not contain characters not allowed in XML
09:14:54      at XmlCharData.set [as charData] (/var/lib/jenkins/workspace/E2E/node_modules/xmlcreate/lib/nodes/XmlCharData.js:75:23)
09:14:54      at new XmlCharData (/var/lib/jenkins/workspace/E2E/node_modules/xmlcreate/lib/nodes/XmlCharData.js:53:24)
09:14:54      at XmlElement.charData (/var/lib/jenkins/workspace/E2E/node_modules/xmlcreate/lib/nodes/XmlElement.js:168:28)
09:14:54      at parseString (/var/lib/jenkins/workspace/E2E/node_modules/js2xmlparser/lib/main.js:53:27)
09:14:54      at parseValue (/var/lib/jenkins/workspace/E2E/node_modules/js2xmlparser/lib/main.js:227:5)
09:14:54      at parseObjectOrMapEntry (/var/lib/jenkins/workspace/E2E/node_modules/js2xmlparser/lib/main.js:132:5)
09:14:54      at parseObjectOrMap (/var/lib/jenkins/workspace/E2E/node_modules/js2xmlparser/lib/main.js:152:13)
09:14:54      at parseValue (/var/lib/jenkins/workspace/E2E/node_modules/js2xmlparser/lib/main.js:220:9)
09:14:54      at parseObjectOrMapEntry (/var/lib/jenkins/workspace/E2E/node_modules/js2xmlparser/lib/main.js:132:5)
09:14:54      at parseObjectOrMap (/var/lib/jenkins/workspace/E2E/node_modules/js2xmlparser/lib/main.js:152:13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.