Map commands
Scan your code, crawl your app and read the map of its pages.
A map lists an app's routes and which roles reached each one. rehearsal map scan reads the app's code on your computer and sends Rehearsal the routes it found, never the files. rehearsal map crawl opens the app signed out and then as each test account, to see which pages each role reaches.
rehearsal map show reads the result. Each command asks which app when the project has more than one. Map your app walks through all three.
rehearsal map scan Link to rehearsal map scan
Read an app's code on this computer and add its routes to the map.
Reads the code in the folder you name, or in this one. Only what it found, such as the routes, goes to Rehearsal; the files stay on this computer.
rehearsal map scan [path] [flags]| Argument | Description |
|---|---|
[path] | The folder that holds the app's code. The default is this folder. |
| Flag | Description |
|---|---|
--app <app> | The app, by name or ID. Defaults to REHEARSAL_APP_ID or rehearsal.config.json. Asked when neither names one and the project has more than one. |
--platform <platform> | With --app, which kind of app: web, electron, ios or android. Needed only when two apps share a name. |
--dry-run | Ask and check everything, then stop before anything starts or changes, and say what would happen. Off by default. |
--workspace <workspace-id> | Workspace ID. Defaults to REHEARSAL_WORKSPACE_ID or rehearsal.config.json. |
--project <project> | Project ID, slug or name. Defaults to REHEARSAL_PROJECT_ID or rehearsal.config.json. |
Needs a sign-in with the testing:run scope and permission to manage projects.
# Scan this folderrehearsal map scan --app Gruvi# Scan another folder from a scriptrehearsal map scan apps/web --app <app-id> --json# See what it finds, and send nothingrehearsal map scan --app Gruvi --dry-runrehearsal map crawl Link to rehearsal map crawl
Open an app signed out and as each account you name, and record its pages.
The browser follows the app's links signed out, then once as each account you name with --account. Of two accounts with the same role, only the first is used. The only form it sends is the sign-in form.
rehearsal map crawl [flags]| Flag | Description |
|---|---|
--app <app> | The app, by name or ID. Defaults to REHEARSAL_APP_ID or rehearsal.config.json. Asked when neither names one and the project has more than one. |
--platform <platform> | With --app, which kind of app: web, electron, ios or android. Needed only when two apps share a name. |
--environment <environment> | Where the app runs: an environment ID, a kind such as staging, or a computer name. Asked when the app has more than one. |
--account <label-or-id> | A test account to sign in with, by label or ID. Repeat for each account. |
--wait | Wait until the crawl ends, or until --timeout passes. |
--timeout <time> | With --wait, how long to wait, such as 90s or 10m. The default is 10m, at most 1h. |
--dry-run | Ask and check everything, then stop before anything starts or changes, and say what would happen. Off by default. |
--workspace <workspace-id> | Workspace ID. Defaults to REHEARSAL_WORKSPACE_ID or rehearsal.config.json. |
--project <project> | Project ID, slug or name. Defaults to REHEARSAL_PROJECT_ID or rehearsal.config.json. |
Needs a sign-in with the testing:run scope and permission to manage projects.
Ctrl+C stops waiting. A started crawl keeps going.
# Record what two accounts can reachrehearsal map crawl --app Gruvi --account member --account admin --wait# Start a crawl from a scriptrehearsal map crawl --app <app-id> --environment <environment-id> --json# See what it would open, and start nothingrehearsal map crawl --app Gruvi --dry-runrehearsal map show Link to rehearsal map show
Show an app's routes and whether each role reached them.
For each route and role, covered means a crawl reached the page as that role, missing means a crawl went through the app as that role and never reached it, and unknown means nothing shows either way yet. rehearsal map scan adds the routes, and rehearsal map crawl the roles.
rehearsal map show [flags]| Flag | Description |
|---|---|
--app <app> | The app, by name or ID. Defaults to REHEARSAL_APP_ID or rehearsal.config.json. Asked when neither names one and the project has more than one. |
--platform <platform> | With --app, which kind of app: web, electron, ios or android. Needed only when two apps share a name. |
--operations | First work out the app's operations, the things people do in it and the rules they follow, from its scan and crawl, then read the map. This can take up to 10 minutes. |
--environment <environment> | Count only what a crawl reached in this environment: an environment ID, a kind such as staging, or a computer name. |
--limit <count> | How many routes to return, 1 to 100. The default is 100. |
--cursor <cursor> | Continue from the cursor the last page returned. |
--dry-run | Ask and check everything, then stop before anything starts or changes, and say what would happen. Off by default. |
--workspace <workspace-id> | Workspace ID. Defaults to REHEARSAL_WORKSPACE_ID or rehearsal.config.json. |
--project <project> | Project ID, slug or name. Defaults to REHEARSAL_PROJECT_ID or rehearsal.config.json. |
Needs a sign-in with the testing:read scope and permission to read projects. --operations also needs the testing:run scope and permission to manage projects and use Re:agent.
This command can start paid work.
# Show the maprehearsal map show --app Gruvi# See what working out the operations would dorehearsal map show --app Gruvi --operations --dry-run# Read what one environment reached, from a scriptrehearsal map show --app <app-id> --environment staging --json