Key Concepts

Things you must know about the various tools Chimp uses

Chimp gives you the following opinionated tool combination:

  • CucumberJS
  • WebdriverIO
  • Selenium / PhantomJS
  • Jasmine Expect / Chai + Chai-As-Promised
  • DDP / NPM

The combination of these tools allows you to:

  • Write specifications files and automate them
  • Control the client
  • Control the server

Specifications & Automation

You use CucumberJS to define specifications using natural language in '.feature' files, and you automate the features with JavaScript or CoffeeScript code in "step definition" files. Read more about Cucumber.js.

Client Control

In the automation layer you use WebdriverIO to control a browser. This allows you to automate clicking, typing, waiting for things to happen and reading values from your site, and supports chaining of commands to reduce unreadable callback nesting. Read more about WebdriverIO.

You can choose any real browser like Chrome or Firefox using Selenium, or you can use PhantomJS's GhostDriver if you know exactly what you're doing (or you're a sucker for pain!). You can also run your automation on multiple browsers to ensure you catch any cross-browser issues. Read more about Selenium & GhostDriver.

You get clean callback-less promise-less assertions using either the Jasmine or Chai assertion libraries.

Managing the UI automation codebase can get pretty complicated. The baked-in Chimp-Widgets library provides you with a design pattern that helps you create reusable and maintainable high-level commands for your app. Read more about Chimp Widgets.

Server Control

You will likely need "back-door" access to your servers for automation so that you can perform tasks like:

  • Clearing state / databases
  • Adding test data
  • Enabling / disabling mocks & stubs
  • Modifying clocks

You can do this by creating fixtures or similar, and you can use *NPM** modules to use the protocol of your choice to talk to your fixture controller, such as REST using the request module.

If you are using Meteor, you can use the xolvio:backdoor package and have a pre-wired DDP connection in the automation layer to perform the above.

Take some time to explore the rest of the Must Know section if you are new to the concepts above.



##Learn the Fundamentals of Testing, Specifications and Become a Chimp Ninja!
Checkout our new book where you can learn how to can use Chimp across the Full Stack from React to Node.JS, Mocha, Meteor and more.

Quality, Faster. By Sam Hatoum, creator of Chimp.