Skip to content

A step by step guide on how to use ConfigCat's Public API to conduct an integration test.

Notifications You must be signed in to change notification settings

configcat-labs/public-api-guide-integration-testing-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How to use ConfigCat's public API to conduct integration tests

This is a companion code repository for the blog article as titled above. The article guides the reader step by step on how to use ConfigCat's Public API to conduct an integration test.

If you wish to code along with me, you can check out the starter-code branch. Getting stuck? feel free to view the complete code on the main branch.

Build & Run

  1. Clone this repository.

  2. Run the following command to installed the required npm packages:

npm install
  1. Add your credentials to utils/axios/axios-instance.js;
// ...
const axiosInstance = axios.create({
  baseURL: 'https://api.configcat.com/v1/',
  headers: {
    'X-CONFIGCAT-SDKKEY': 'YOUR-CONFIGCAT-SDKKEY'
  },
  auth: {
    username: 'YOUR-AUTH-USERNAME',
    password: 'YOUR-AUTH-PASSWORD'
  }
});
// ...
  1. Run the integration test with the following command.
npm run test

If errors are uncovered, they will be thrown and displayed in the console.

Learn more

Useful links to technical resources.

ConfigCat also supports many other frameworks and languages. Check out the full list of supported SDKs here.

You can also explore other code samples for various languages, frameworks, and topics here in the ConfigCat labs on GitHub.

Keep up with ConfigCat on Twitter, Facebook, LinkedIn, and GitHub.

Author

Chavez Harris

Contributions

Contributions are welcome!

About

A step by step guide on how to use ConfigCat's Public API to conduct an integration test.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published