Skip to main content

Data integration tests

After you implement API, contact the TradingView team. They will prepare a test suite in Jenkins and provide you with credentials. The tests help you ensure that the integration with the TradingView user interface works correctly.

info

Data integration autotests must be passed with the full number of groups in /groups and contain the full list of symbols in each group before the data feed can be deployed to TradingView staging environment.

Run-time details

Tests' run-time depends on two things:

  • Your server response time: some servers may take milliseconds to return data, while it may take seconds for others.
  • The number of symbols provided in the integration: the more you have, the longer it may take. For example, tests that check the /history endpoint request each symbol. This means that the run-time for a 100symbol integration is much faster than for a 10,000symbol integration.

Run-time reconfiguration

Usually, each test for /streaming takes at least two hours to run. However, the TradingView team may reconfigure these tests for shorter runtimes in a rare case, such as when you need to fix a bug. Note that run-time reconfiguration is more of an exception, as proper validation is required for the best data quality.

Run tests

  1. Log into Jenkins. You will see the main page of your build plans.

  2. Select DataIntegrations → inspect<project_name> to open your project page.

  3. Go to Build with parameters and select the parameters that correspond to the endpoints of your API. Here, you can select all endpoints at once or just one.

    caution

    The /history and /streaming tests require the /symbol_info and /groups (if you have groups implemented) tests to pass. Otherwise, even if there are no issues with /history and /streaming, the tests will fail.

    Build with parameters

  4. Select Build.

  5. Wait for the tests to complete. You can check the progress bar in Build history.

  6. Select the latest build number to view test results.

Test results

On the project's page → Build History, you can see the list of latest builds.

Jenkins main page

The build number can be highlighted in one of the following colors:

  • Green indicates that all tests passed. In this case, contact the TradingView team for further instructions.
  • Yellow or red indicates that there are issues in the tests that need to be fixed.

Build history

Check failed builds

If the build failed, follow the steps below to check the results.

  1. Click the failed build number to access the status page for the chosen build.
  2. Go to the Test Result section, where you will find a list of all failed tests. Test result page
  3. Select the specific failed test to access its error details. These details include links to the test description on GitHub and to the dump file that contains request contents. Failed test preview
  4. Address all issues and run the build again.

Next steps

To continue with the integration process, ensure that all tests for /groups, /symbol_info, /history, and /streaming have passed. Otherwise, the TradingView team will not be able to process the data delivery.

When all tests are passed, contact the TradingView team for further instructions.