Reliable javascript test automation | Gauge - Taiko
Gauge is a free and open source test automation tool that takes the pain out of maintaining acceptance tests.
Taiko is free and open source node library with a clear and concise API built ground up to test modern web applications.
Together, Gauge and Taiko help you create reliable and easy to maintain end to end tests.
Gauge and Taiko is one of the best test automation duos out there. Gauge applies BDD methodology but removes all roadblocks of enforced syntax, long setup and tool-specific formats. Instead, Gauge relies on a known standard of markdown, build-in support for reporting, and free format to match your team's domain. Together, Gauge and Taiko get your team up and running fast, and ensure you focus your effort on dealing with bugs you uncover with your test suites, rather than on maintaining your test suite itself.
Dmitry Vinnik Lead Software Engineer, Salesforce.
Testing Experience Simplified Using Gauge + Taiko
YouTube
Tap to unmute
Video player configuration error
Visit YouTube to search for more videos
Video player configuration error
Error 153
Watch video on YouTubeLearn more
Error 153
- Install and initialize
- Record Tests
- Generate Scripts
- Write Specs
- Create Reports
Install and initialize
dyld: Library not loaded: /usr/local/lib/libgdbm.4.dylib
Referenced from: /usr/local/bin/zsh
Reason: image not found
zsh: abort
➜ Desktop npm install -g @getgauge/cli
/usr/local/bin/gauge -> /usr/local/lib/node_modules/@getgauge/cli/bin/gauge
> @getgauge/cli@1.0.3 install /usr/local/lib/node_modules/@getgauge/cli
> node ./src/index.js
Fetching download url for Gauge version 1.0.3
Downloading https://github.com/getgauge/gauge/releases/download/v1.0.3/gauge-1.0.3-darwin.x86_64.zip to ./bin
+ @getgauge/cli@1.0.3
updated 4 packages in 20.843s
➜ Desktop g
00:00-01:22Keyboard shortcuts (?)Fullscreen (f)
Recorded with asciinema
Install and initialize
Gauge and Taiko are simple to set up. Start with a sample JavaScript project using these commands
npm install -g @getgauge/cli
gauge init js
Record Tests
dyld: Library not loaded: /usr/local/lib/libgdbm.4.dylib
Referenced from: /usr/local/bin/zsh
Reason: image not found
zsh: abort
➜ Desktop taiko
Version: 0.4.0 (Chromium:73.0.3638.0)
Type .api for help and .exit to quit
> openBrowser() ✔ Browser opened
> goto("google.com") ✔ Navigated to url "http://google.com"
> write("Taiko test automation")
00:00-01:11Keyboard shortcuts (?)Fullscreen (f)
Recorded with asciinema
Record Tests
Taiko comes with a Recorder that’s a REPL to write test scripts. Use Taiko commands to control the browser from REPL.
Generate Scripts
✔ Navigated to url "http://google.com"
> write("Taiko test automation") ✔ Wrote Taiko test automation into the focused element.
> click("Google Search") ✔ Clicked element matching text "Google Search"
> .code
const { openBrowser, goto, write, click } = require('taiko');
(async () => {
try {
await openBrowser();
await goto("google.com");
await write("Taiko test automation");
await click("Google Search");
} catch (e) {
console.error(e);
} finally {
await closeBrowser();
} })(); >
00:38-00:16Keyboard shortcuts (?)Fullscreen (f)
Recorded with asciinema
Generate Scripts
Taiko's '.code' command generates readable and maintainable JavaScript code.
Write Specs
Write Specs
Gauge specifications are in Markdown that make writing tests simple and easy to read. With our recommended VS Code Plugin, authoring specifications are a delight.
Create Reports
dyld: Library not loaded: /usr/local/lib/libgdbm.4.dylib
Referenced from: /usr/local/bin/zsh
Reason: image not found
zsh: abort
➜ gauge-js gauge run specs
(node:40982) DeprecationWarning: grpc.load: Use the @grpc/proto-loader module with grpc.loadPackageDefinition instead
# Getting Started with Gauge
## Search Google ✔
00:00-00:29Keyboard shortcuts (?)Fullscreen (f)
Recorded with asciinema
Create Reports
Gauge helpfully takes a screenshot on a test failure allowing you to see what went wrong. Run your specification on the command line/terminal using
gauge run specs
Reports are available across multiple formats (XML, JSON, HTML).
Gauge and Taiko are built by ThoughtWorks and are open source and free to use.
You can reach out to the Gauge community for any support.