Testing
  • 09 Nov 2022
  • Dark
    Light
  • PDF

Testing

  • Dark
    Light
  • PDF

Article Summary

All Itential built adapters as well as adapters built by the Adapter Builder include test scripts. In most adapters, the dependencies required to run tests are regular dependencies and not devDependencies. This is because some of the adapter scripts for checking health and troubleshooting utilize the tests.

Test the adapter when you first install it to make sure it test clean. There are adapter base, unit, and integration tests that come with the adapter. You can run them together (npm run test). If however, there are errors during testing, you may want to run them separately. To run separately:

  • adapter base test: npm run test:baseunit
  • unit test: npm run test:unit
  • integration test: npm run test:integration

The unit test includes a test to check that the adapter.js and pronghorn.json methods are in sync. This is a useful test to verify that tasks in IAP Automation Studio will be passing the right parameters into the adapter. This test can take a significant amount of time for large adapters (e.g. 5-10 minutes). There is additional information in the article on Key Unit Tests

The integration tests are run in stub mode and so they make use of any mock data that has been provided with the adapter. There is additional information in the article on Key Integration Tests

While testing errors are not always related to run time issues, fixing testing issues can often help you prevent run time issues from occurring.

As a best practice always make sure the adapter tests clean after making any code or configuration changes.

Note: If the adapter does not test properly, the adapter can have runtime issues with 1 or more calls to the other system.


Was this article helpful?

What's Next
Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.