How can we help?

Smart triggers

You are here:

Trudon can be easily integrated with most build systems or CI/CD platforms thanks to smart triggers.

A smart trigger is a URL that can be called from an external system to start executing a test suite via a smart run.

Generate the smart trigger URL

To get the smart trigger for a test suite, you first have to create a smart run for it. Check the documentation for smart runs here.

Once you have a smart run created and configured, navigate to that smart run, go to the smart triggers tab and click on the Generate smart trigger URL button.

Use the smart trigger URL to start the tests

The URL that appears is the smart trigger for the smart run. It contains all the information to uniquely and securely identify the smart run. Any time you want to start it, just make a GET request to that URL.

The response lets you know if the action was successful and returns the newly started job’s id. Example:

{"success":true,"jobSetId":330408, "checkStatusLink": "{{ACTUAL_LINK_TO_CHECK_THE_STATUS}}"}

With such a straightforward approach, you can start your tests from any continuous integration/delivery system. Depending on how you configured the smart run notifications, you will get alerted if the test suite run was successful.

Get the status after triggering a smart run

When you start a smart run using the trigger link, it returns a JSON with three values: success, jobSetId and checkStatusLink. The checkStatusLink contains the URL you need to execute (using a GET request) in order to see the status of the test runs. The response has the following format:

   "status":"running", // It could be: scheduled, runnning, passed or failed
      { // You can also get the status for every browser/resolution/device combination
         "label":"firefox-Wide Quad HD",
               "status":"running" // Status for every single test is present as well
         "label":"chrome-Wide Quad HD",
            // As this job is waiting for the previous one to finish
            // it doesn't include the status yet

You can make requests (ex: every 5 seconds) until the main status is ni longer scheduled or running.

Was this article helpful?
0 out Of 5 Stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
How can we improve this article?
Need help?