Suites
On this page
A suite is a set of tests for your shop, stored as a PHP class that extends TestsSuite.
You build it in the app without writing the PHP by hand, and you can always inspect the
generated code.
#Browse your suites
Open Suites › List in the sidebar to see the suites of the active project, on the "Suites" page.
- Filter the list with All, Failed or Passed.
- Sort by Newest, Oldest, A to Z or Z to A.
- Switch between the Grid and the List display.
Each suite offers Run, Edit, Add to favorites, Archive (or Restore for an archived suite) and Delete. Two badges may appear on a card: "Library" for a vendor example suite, and "Visual" for a visual regression suite.
Two more entries sit next to List:
- Favorites: "Star a suite to pin it here for quick access."
- Archives: "Suites you set aside, still browsable and restorable."
#Create a suite
Click the "+" next to Suites in the sidebar and choose New suite. Enter a "Suite name", then pick a "Starting point":
| Starting point | What you get |
|---|---|
| Blank | "An empty suite". |
| From the library | "Start from a vendor example". |
| Import a file | "A .php from your computer". |
With Import a file, the file is parsed, never executed. It must extend TestsSuite
and can weigh at most 256 KB.
Click Create the suite. The suite editor opens.
#The suite editor
The top of the editor holds the name of the suite and its Description, which "Appears as the suite title in the generated PHP."
#Used elements
This section lists the use imports of the PHP file.
- Add an element adds an import by hand: fill in the Class path and an Alias.
- Pick an existing element reuses one already known to the project.
- An element that is imported but never used gets an "orphan" badge. Clean orphans removes them all.
- When a class is used but not imported, it is listed under "Referenced but not imported". Add all imports them in one click.
#Suite content
- Imported pages: click Add a page to pick the page objects the suite uses.
- Executed scenarios: click Add a scenario to pick the scenarios the suite runs. Use Move up and Move down to set their order.
See Scenarios & pages for how to create them.
#Tests
The Tests section lists the "Behaviors verified by this suite." Each test may bundle several steps. A test has three parts:
- Steps: click Add a step, then fill in an Action, a Parameter and a Value.
- Expectations: click Add an expectation to say what must be true, for example "contains", "is visible" or "customer is logged in".
- Datasets.
A button on each test converts it into a standalone scenario. The app saves the suite first, then creates the scenario, so you can reuse the steps in other suites.
#PHP code
Click Code to open the "PHP code" modal. It shows the PHP generated for the suite. From there you can use Wrap, Diff, Download and Copy.
Click Save to store your changes.
#Suite settings
The settings sidebar of the editor holds the options of this suite:
- Draft
- Debug mode: "Check that the shop is in maintenance mode and bypass the moved page"
- Picture
- Title
- Path
- Version
- Locale
- User-agent
- Groups
- Front Office and Back Office URLs and credentials
Every setting that can come from the project falls back to it when you leave it empty. The field then reads "Project default (…)" followed by the current value, and the version reads "Project version (x)". Fill a field in only when this suite must differ from the project. The project defaults are described in Your first project.
#Bulk import
To bring many files at once, click the "+" next to Suites and choose Bulk import.
- Click Choose files, or drag and drop them on the drop zone ("or drag and drop
here"). Select
.phpor.zipfiles (".php or .zip, up to 5 MB each"). - Click Import.
When the import ends, you get an "Import completed" notification and a report. It is split into these sections: Suites, Scenarios, Pages, Helpers, Skipped and Failed. Imported items carry a New or Updated badge.
#Delete a suite
Use Delete on the suite. Three options let you choose how far the deletion goes:
- "Also delete past results"
- "Also delete the PHP file on disk"
- "Also delete visual references and their history" (for visual suites)
If you only want to hide a suite, use Archive instead: you can restore it later.