Skip to main content

Squash TM Integration: Import Tests, Create Tests and Sync Results

Connect Squash TM with its base URL and a personal API token, use Thunders AI to import, create and update Squash TM test cases, and sync run results to a Squash TM iteration by hand or automatically.

Written by Ines

Connect your Squash TM instance on the Connectors page with its URL and a personal API token. Thunders AI can then read your Squash TM test cases and requirements, turn them into Thunders Test Cases, and create or update test cases in Squash TM. After a run, Thunders records the result as a new execution in a Squash TM iteration, by hand from the run report or automatically when the run finishes.

Before you start

  • Squash TM 7.1 or later.

  • A personal API token from your Squash TM account, with the Read and write permission. Create it in Squash TM under My account > Personal API tokens. Squash TM shows a new token only once ("This token will only be displayed once, make sure you copy it and keep it safe."), so copy it before you close the window.

  • The URL of your Squash TM, with the path after the domain, for example https://squash.example.com/squash.

  • A Squash TM server that Thunders can reach, from the internet or through your organization's relay. See "Connect a Squash TM server on a private network" below.

Connect Squash TM

  1. Open your Test Project and go to the Connectors page.

  2. Find Squash TM in the list and click Connect.

  3. In Squash TM URL, enter the address of your Squash TM, with the path after the domain.

  4. In Personal API token, paste your token. For the steps to create the token, click How do I create this token?

  5. Click Connect. Thunders checks the URL and the token, confirms with "Squash TM connected", and opens the Squash TM settings page. To sync run results, choose a default iteration there. See "Sync automatically" below.

When the connection works, Squash TM appears in the source selector at the bottom of the Thunders AI input.

Squash TM connections are personal: each user connects with their own API token, per project. Thunders stores the token encrypted. Teammates connect their own access from the same Connectors page.

Connect a Squash TM server on a private network

If your Squash TM server is reachable only inside your company network, Thunders reaches it through your organization's relay. The relay must be running, and it must be able to reach the Squash TM server, each time Thunders connects, reads from Squash TM or syncs a result. When the relay is not running, Thunders shows "Your relay is offline. Start it and try again." If your organization has no relay yet, contact [email protected].

If the connection fails

Thunders shows

What to do

"Squash TM rejected the API token. Check the token (My Account → API tokens) and that the URL is the instance root (e.g. https://squash.example.com/squash)."

Create a new API token and paste it again. Check that the URL ends with the path after the domain, with nothing after it.

"The Squash TM REST API was not found at this URL. Check that it includes the context path (e.g. /squash)."

Add the path after the domain to the URL, for example /squash.

"This URL did not answer like the Squash TM REST API (it may be behind a login page or proxy). Check the URL, including the context path (e.g. /squash)."

The URL opens a sign-in page, not Squash TM. Use the address of the Squash TM server itself, with the path after the domain.

"Thunders cannot reach this address. Check the URL."

Check the URL for a typing error. For a server on a private network, check that your relay is running and can reach the server.

"This Squash TM URL is not allowed. It must point to a public internet address, not a local or private network one."

The address is on a private network, and no relay of your organization reached it. Use a public address, or connect through a relay that can reach the server.

If Squash TM cannot create your token and shows "No JWT secret is defined for this instance. Please contact your SquashTM administrator.", your Squash TM administrator must first set squash.rest-api.jwt.secret on the Squash TM server. This setting is on the Squash TM side, not in Thunders.

Use Squash TM with Thunders AI

Turn on Squash TM in the source selector, and name Squash TM in your request. Thunders AI uses Squash TM only when you name it: a request to create or write a test that does not mention Squash TM creates a Thunders Test Case only.

Squash TM has no keyword search. Give Thunders AI the project and the name, reference or ID of the test case, and it browses the folders of the project to find it.

Import an existing Squash TM test case

Example

You: In Squash TM project [project name], read the test case "Checkout with a saved card" and create a Thunders test case from it.

Thunders AI reads the Squash TM test case, with its prerequisite, its description and every step in order, and writes a Thunders Test Case that keeps the same steps.

The new Test Case keeps a link to its source. In the Test Case properties panel, the Source list shows the Squash TM test case by its reference and name, for example "TC-001 · Checkout with a saved card", with a link to it in Squash TM. The Type column shows its Squash TM type: Classic, Gherkin, BDD or Exploratory. To remove the link, click Detach. Thunders then stops syncing new runs of that Test Case, and the runs already synced stay synced.

Create a Thunders test from a Squash TM requirement

Example

You: In Squash TM project [project name], read the requirement "Saved payment cards" and create a Thunders test case that covers it.

Thunders AI reads the requirement, with its current description and the Squash TM test cases that already verify it, and uses them as context for the new Test Case.

Create a test case in Squash TM

Example

You: Create this test case in Squash TM project [project name].

Thunders AI looks up the Squash TM projects that your API token can see. When there is only one, it uses it. When there are several and your request names none, it asks you to choose. It creates a Classic test case, writes each step as an action with its expected result, and gives you the ID and the name of the new test case.

When you ask from a Thunders Test Case, Thunders links the new Squash TM test case to it, so that you can sync its runs to Squash TM.

Update a test case in Squash TM

Example

You: Update the linked Squash TM test case with the current steps of this test case.

Thunders AI changes an existing Squash TM test case only when you ask for it, and only a Classic test case. It updates the name, description, prerequisite or steps that you ask for, then tells you which steps it updated, added and removed. Steps that call another test case stay as they are.

Sync test results to Squash TM

Thunders records each run that you sync as a new execution of the linked Squash TM test case, in the iteration that you choose. You can sync a run by hand from its report, or turn on automatic sync. Only the runs of a Test Case linked to a Squash TM test case can be synced. The link is created when you import a test case from Squash TM, or create one in Squash TM through Thunders AI.

Sync a run manually

  1. Open the report of a finished run.

  2. In the properties panel, the Source section shows the linked Squash TM test case and the message "Not synced to Squash yet".

  3. Click Sync to Squash. The dialog shows "Choose the iteration for this result."

  4. Choose a Campaign, then an Iteration. The Squash project is the project of the linked test case. When the Schedule of the run or your default iteration already names an iteration, the dialog starts on it and says where it comes from.

  5. Click Sync to Squash.

  6. When the sync completes, the button is replaced by "Synced to Squash" and the number of the new execution, which opens it in Squash TM.

If the sync fails, the Source section shows the reason, and Sync to Squash stays available so that you can try again.

Sync automatically

  1. On the Connectors page, click Manage on the Squash TM row.

  2. In Settings, under Default iteration, choose a Squash project, a Campaign and an Iteration. Runs are synced to this iteration unless their Schedule sets another one.

  3. Turn on Sync after each run. The switch stays unavailable until you choose an iteration.

  4. Click Save. Thunders confirms with "Settings saved".

How automatic sync works

  • Thunders pushes a run as soon as it finishes, whether it passed, failed or was interrupted.

  • Only the runs of Test Cases linked to a Squash TM test case are pushed. Other runs are not affected.

  • The default iteration and the auto-sync setting belong to your own Squash TM connection. The push uses the connection, and the default iteration, of the project member who turned on auto-sync, so keep that connection active.

  • A run that is already synced is not pushed a second time.

  • When Thunders has no iteration to record a run in, the Source section of the run shows "Not synced: the Squash TM connector has no default iteration." Click Set the default iteration to open the connector settings, or sync the run by hand from there.

Send the runs of a Schedule to their own iteration

When your Squash TM connection has auto-sync turned on, the Schedule dialog shows an optional Squash iteration field, below Persona. Choose a project, a campaign and an iteration to record the runs of that Schedule there. Leave the field empty to use the default iteration of the connector, or click Use the default to clear your choice. For the rest of the dialog, see how to schedule a Test Set.

Thunders chooses the iteration in this order:

  1. The iteration that you pick in the Sync to Squash dialog.

  2. The iteration set on the Schedule of the run.

  3. The default iteration of the Squash TM connection.

What Thunders records in Squash TM

  • The execution: a new execution of the test case in the chosen iteration. When the test case is not yet in the Execution plan of the iteration, Thunders adds it first.

  • The overall status: a passed run is recorded as Passed, a failed run as Failed, and an interrupted, stopped or cancelled run as Blocked.

  • The comment: a "Thunders steps" list with each Thunders step and its result. For a failed step, the comment also gives what Thunders found: the type and severity of the issue, the element, and the expected and actual results. The comment ends with a "Thunders run:" link to the run in Thunders.

Thunders does not map its steps onto the steps of the Squash TM execution, and it does not upload screenshots. The result of each Thunders step is in the execution comment. To see the screenshots, open the Thunders run from the link in the comment.

What Thunders AI can do with Squash TM

When Squash TM is connected and turned on, Thunders AI can work with the following Squash TM content:

Squash TM content

What Thunders AI can do

Projects

List the projects that your API token can see.

Test cases

Browse the folder tree of a project, list its test cases, and read a test case with its steps and its type. Create Classic test cases, and update an existing Classic test case when you ask for it.

Requirements

List the requirements of a project, and read a requirement with its description and the test cases that verify it.

Campaigns and iterations

List the campaigns of a project and the iterations of a campaign, and read the Execution plan of an iteration.

Executions

Read an execution. When you ask to record a result, create an execution and set the status of the execution and of each of its steps.

Disconnect Squash TM

On the Connectors page, click Manage on the Squash TM row, then click Disconnect and confirm. This removes your API token and your saved settings, including the default iteration and auto-sync. Squash TM is then no longer available to you in Thunders AI.

Frequently asked questions

How do I see the result of each step in Squash TM?

Open the comment of the execution in Squash TM. A sync from Thunders records the overall result of the run, and the comment lists each Thunders step with its result and a link to the run in Thunders. Thunders does not fill in the steps of the Squash TM execution.

How do I retry a sync that failed?

Click Sync to Squash again on the run report. The Source section shows the reason that Squash TM gave, for example "Squash TM refused the sync (HTTP 403)", so check that your API token is still valid and has the Read and write permission. When Squash TM created the execution during the failed attempt, the retry records the result in that same execution, so you do not get a second one.

How do I sync a run to an iteration other than the default?

Sync it by hand. The Sync to Squash dialog starts on the default iteration, or on the iteration of the Schedule, and you can choose another campaign and iteration before you confirm. To send all the runs of a Schedule to another iteration, set Squash iteration in the Schedule dialog.

How do I change the Squash TM URL or API token?

Disconnect Squash TM from its Manage page, then connect again with the new URL or token. Disconnecting removes your default iteration and your auto-sync setting, so set them again after you connect.

Related articles on this topic that you might find helpful

Did this answer your question?