Slack Integration

Applies to ReadyAPI 3.57, last modified on December 20, 2024

Slack is a team communication tool that provides real-time messaging. You can integrate ReadyAPI with Slack to share your test results with your team in a Slack channel or in direct messages.

Test results include a short summary of a test run and an archived report.

Note: To receive only a test run summary without a report, disable reporting on the Reporting tab of the Launch TestRunner dialog, or do not set the corresponding arguments if you launch the runner using the command line. You can send a test run summary only to one Slack channel or user.
Test run results in Slack

Important Notes

  • Currently, Slack integration is supported only for functional tests that are run via Functional TestRunner.

  • To integrate ReadyAPI with Slack, you need a ReadyAPI Test Pro license. If do not have it, you can either request it on our web site or start a trial.

  • To integrate ReadyAPI with Slack, you need to create a Slack application in your workspace. If you leave your workspace, your application will be uninstalled.

1. Create a Slack App

To integrate ReadyAPI with Slack, you need to create and set up a Slack application that uses workspace tokens. To do this:

  1. In your browser, navigate to https://api.slack.com/apps?new_app_token=1.

  2. In the Create a Slack App dialog, enter an application name, select your workspace, and click Create App.

    Creating a Slack app

    Click the image to enlarge it.

  3. Switch to the OAuth & Permissions tab, select the following permission scopes from the Scopes > Select Permission Scopes dropdown, and click Save Changes:

    • chat:write:bot

    • chat:write:user

    • files:write:user

    • bot

    Permission scopes

    Click the image to enlarge it.

  4. Switch to the Bot Users tab and click Add a Bot User.

    Adding a bot user

    Click the image to enlarge it.

  5. Specify a Display name and Default username of the bot and click Add Bot User > Save Changes.

    Adding a bot user

    Click the image to enlarge it.

  6. Switch to the Install App tab, click Request Approval > Submit Request, and then click Install App to Workspace.

    Installing the Slack app

    Click the image to enlarge it.

2. Configure ReadyAPI

Now, you need to set up ReadyAPI to post test results via Slack. To do this, you need to provide the following:

  • The authentication token of the bot user of your Slack application.

    To get the bot authentication token, open the Slack application settings, switch to the OAuth & Permissions tab, and copy the Bot User OAuth Access Token value.

    Slack bot authentication token

    Click the image to enlarge it.

  • Slack channels or the IDs of the users to send test results to. You can specify both channels and user IDs.

    To specify a channel, use the #channel-name format.

    To send test results to a user in a private message, specify the ID of the user.

    • In Slack, search for a user in your workspace and open their profile.

    • Click > Copy member ID.

      User ID in Slack

You can integrate ReadyAPI with Slack by using the ReadyAPI user interface or command-line arguments.

In ReadyAPI UI

  1. In ReadyAPI, select Project > Launch TestRunner from the main menu.

    ReadyAPI: Launching the test runner from the Project menu

    -- or --

    In ReadyAPI Navigator, right-click the needed test case and select Launch TestRunner.

    ReadyAPI: Launching the test runner from the context menu
  2. In the Launch TestRunner dialog, set up integration with Slack in either way:

    • Switch to the Reports tab and specify the following options:

      • Root Folder – (Optional) The directory that will store the test reports ReadyAPI will export. If the directory is not set, the test runner will post a test run summary without a report to Slack.

      • Slack Access Token – Your bot user authentication token.

      • Slack Channel(s) – A comma-separated list of Slack channels in the #channel-name format, or the IDs of the users the test results will be sent to.

      Reports tab

      Click the image to enlarge it.

    • Switch to the Custom Args tab and enter the -W<access token>/<channel(s)> command-line argument, where <access token> is your bot user authentication token, and <channel(s)> is a comma-separated list of Slack channels or user IDs.

      Custom Arguments tab

      Click the image to enlarge it.

  3. Configure the other options as needed.

  4. Click Launch.

With the Command Line

  1. Launch TestRunner with the following command-line argument:

    <ReadyAPI>/bin>testrunner.bat -W<access token>/<channel(s)>
  2. Specify other arguments as required.

See Also

Automating Functional Tests
Integrations

Highlight search results