This add-on is operated by Parrot QA
The easiest way to test your website.
Parrot QA
Last updated July 29, 2019
Table of Contents
Parrot enables you to build, run, and maintain full-stack integration tests without writing any code. Using Parrot, you can test anything from customer login flows to more complex features like advanced search.
Parrot sits on tops of Selenium, but you don’t have to know anything about Selenium to use it. Both test Actions and Expectations are defined through the Parrot GUI.
When a test Expectation fails, Parrot emails a video replay, the steps to reproduce, and a DOM snapshot.
Provisioning the add-on
Provision the Parrot add-on via the Heroku Dashboard or CLI:
$ heroku addons:create parrot -a your-app-staging
After the add-on is provisioned (which sometimes takes 10-15 seconds), you can open its dashboard from the Heroku Dashboard or CLI:
$ heroku addons:open parrot
Integrating with review apps
If you want to run tests on every GitHub pull request, you can combine Heroku Review Apps, GitHub, and Parrot to implement CI/CD.
First, activate GitHub Review Apps on your Heroku Pipeline and make sure that parrot
is in your app.json
addons
array, like so:.
{
"name": "Your App",
"description": "A well-designed and well-tested web app!",
"addons":[
"parrot",
{ "plan": "heroku-postgresql" },
],
...
}
Then add the Parrot Add-on to the staging
app in your Heroku Pipeline:
$ heroku addons:create parrot -a your-app-staging
Finally, link the Parrot GitHub Integration.
Every time you open a GitHub pull request, Heroku will spin up a review app, Parrot will run your staging
tests against it, and test results will be passed along to the pull request.
Defining Actions
Actions are the browser events that Parrot automates. For example, an Action might be clicking a link or filling out a form.
Each test starts by running zero or more Actions. After all Actions are performed, all Expectations are tested.
Avoid defining multiple synchronous link click Actions in a single test. As soon as Parrot clicks one link, the browser will no longer be on the correct page to click the others.
Defining Expectations
Expectations define what Parrot tests. Define Expectations for attributes that are related to the functionality you’re testing. For example, if you want to test your login flow, you might set an Expectation on the “Welcome, you’ve successfully logged in!” message that shows up in your dashboard. Do not define Expectations for attributes that you expect to change.
You can set Expectations on a variety of different attributes, including:
- A
text
Expectation that an<h1>
says “Your Dashboard” - A
src
Expectation that an<img>
references the correct URL - A
children
Expectation that a container has the appropriate number of child elements
Parrot will automatically generate some basic Expectations for each test, but you can customize Expectations by clicking Edit Expectations.
Test Statuses
Green
A Green test is Passing, which means that all Expectations were met. For example, if you set an Expectation that the header says “Your Profile”, and the header does in fact say “Your Profile”, Parrot will mark that test Green.
Red
A Red test is Failing, which means that one or more Expectations failed. For example, if you set an Expectation that the header says “Your Profile”, but the header says “Bob’s Profile”, Parrot will mark that test Red.
When a test fails, Parrot emails you a screenshot immediately. If the change was intended, you can approve it with one click from your email.
Blue
A Blue test is Running, which means that an active browser session is executing Actions and testing Expectations. If you click on a Blue test oval, you can see a progress bar that indicates the exact Action the test is executing.
Yellow
A Yellow test is Paused, which means that it will not run at its defined time. You can pause or unpause a test by clicking on the gear icon in the top-left corner of the test view, and clicking Pause or Reactivate in the top right.
Video replays
Parrot records a video of every test run. When something breaks, you can watch the video and see all the steps leading up to the failure. You can also watch video replays to check on the animations and transitions triggered by each Action.
Randomized inputs
Parrot allows you to randomize test inputs. For example, if you want to test your registration flow, which requires that every customer has a unique email address, you’ll need to randomize the email input.
When you’re defining the Action, type random email
into the registration form.
Here are the allowed random input types:
What You Type In | Example of Random Data |
---|---|
random email |
ximena.jones.esq@parrotqa.com |
random name |
Ximena Jones Esq. |
random first name |
Ximena |
random last name |
Jones |
random date %b %-d |
Sep 20 |
random characters |
cb0169270cdae450908bb92945f00a7c |
random |
Guileless Partridge |
If you type random
into a field when defining an Action, Parrot will fill it in with something random for every test run.
Removing the add-on
You can remove the Parrot add-on from any Heroku app using the Heroku UI or Heroku CLI:
This will destroy all associated data and cannot be undone!
$ heroku addons:destroy parrot
Support
Parrot offers varying levels of support, depending on the plan you choose. You can reach Parrot support by emailing hey@parrotqa.com, by submitting a ticket to Heroku, or by clicking on the green chat icon in the bottom-left corner of the Parrot dashboard.