Coder Social home page Coder Social logo

smashtest's Introduction

Smashtest • Test 10x Faster

npm version Join the chat at https://gitter.im/smashtestio/community

What is Smashtest?

Smashtest is a language for rapidly describing and deploying test cases.

Greatly speed up your automated testing by writing tests in a tree-like format.

Trees represent how we think when we're testing. They allow us to list all the permutations that branch off from any given point.

  • Multiple browsers and devices
  • UI and API
  • Run tests in parallel
  • Human-readable steps
  • Awesome live reports
  • Run locally or in CI/CD

Sample test

Open Chrome
Open Firefox
Open Safari

    Navigate to 'site.com'

        Click 'Sign In'

            Type {username:} into 'username box'

                {username} is 'joe'
                {username} is 'bob'
                {username} is 'mary'

                    Verify success

                {username} is 'baduser'

                    Verify error

represents

Test Case 1                        Test Case 2                        Test Case 3
-----------                        -----------                        -----------
Open Chrome                        Open Firefox                       Open Safari
Navigate to 'site.com'             Navigate to 'site.com'             Navigate to 'site.com'
Click ['Sign In']                  Click ['Sign In']                  Click ['Sign In']
Type 'joe' into [username box]     Type 'joe' into [username box]     Type 'joe' into [username box]
Verify success                     Verify success                     Verify success


Test Case 4                        Test Case 5                        Test Case 6
-----------                        -----------                        -----------
Open Chrome                        Open Firefox                       Open Safari
Navigate to 'site.com'             Navigate to 'site.com'             Navigate to 'site.com'
Click ['Sign In']                  Click ['Sign In']                  Click ['Sign In']
Type 'bob' into [username box]     Type 'bob' into [username box]     Type 'bob' into [username box]
Verify success                     Verify success                     Verify success


Test Case 7                        Test Case 8                        Test Case 9
-----------                        -----------                        -----------
Open Chrome                        Open Firefox                       Open Safari
Navigate to 'site.com'             Navigate to 'site.com'             Navigate to 'site.com'
Click ['Sign In']                  Click ['Sign In']                  Click ['Sign In']
Type 'mary' into [username box]    Type 'mary' into [username box]    Type 'mary' into [username box]
Verify success                     Verify success                     Verify success


Test Case 10                       Test Case 11                       Test Case 12
------------                       ------------                       ------------
Open Chrome                        Open Firefox                       Open Safari
Navigate to 'site.com'             Navigate to 'site.com'             Navigate to 'site.com'
Click ['Sign In']                  Click ['Sign In']                  Click ['Sign In']
Type 'baduser' into [username box] Type 'baduser' into [username box] Type 'baduser' into [username box]
Verify error                       Verify error                       Verify error

which represents

Test Case 1
-----------
let driver = await new Builder().forBrowser('chrome').build();
await driver.get('http://site.com');
let signInButton = await driver.findElement(By.id('#sign-in'));
await signInButton.click();
await driver.wait(until.elementLocated(By.id('#username-box')), 10000);
let usernameBox = await driver.findElement(By.id('#username-box'));
await usernameBox.sendKeys('joe');
await driver.wait(until.elementLocated(By.id('#success-element')), 10000);


Test Case 2
-----------
let driver = await new Builder().forBrowser('firefox').build();
await driver.get('http://site.com');
let signInButton = await driver.findElement(By.id('#sign-in'));
await signInButton.click();
await driver.wait(until.elementLocated(By.id('#username-box')), 10000);
let usernameBox = await driver.findElement(By.id('#username-box'));
await usernameBox.sendKeys('joe');
await driver.wait(until.elementLocated(By.id('#success-element')), 10000);


etc.

Full documentation

See smashtest.io for full documentation, setup, tutorials, and screenshots

Usage

smashtest [.smash files to run] [options]

Use smashtest -? to list options

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.