Article
· Sep 19, 2023 3m read

IrisApiTester 2.0 new Features

Hi Community!,

I've published a new versión of IrisApiTester, I included some new features:

  • External Repo: Added possibility to use a collection in a repository (Github or Bitbucket) instead of drag manually the collection's file into the web page.
  • Pull and Run: Created new endpoint to auto pull changes in the repo and run the test automatically.
  • Unit Testing / Integration Test: Added an example of how to use IrisApiTester for unit testing and integrations tests 
  • CI/CD: Added new endpoint to use in for example Github workflows after every commit to auto pull changes of the collection's repository, run the tests and send the result to Google Chat.

 

EXTERNAL REPO:

Now you can configure an external repository where the Postman's collection test is stored.

 

-PULL AND RUN:
Pull last version in the repository, pass test and show the report in the browser (Does not require manual actions dragging files):
http://localhost:52773/pull_and_run_tests

 

-UNIT TESTING / INTEGRATION TEST

New route to unitesting:
http://localhost:52773/run/ClassName/MethodName

With this new route '/run' you can publish any method only adding the ClassName to the url and the MethodName, example:
http://localhost:52773/run/IrisNewman.Example.TestMethods/TestOK

It could be used for integration test too, see an example on example:
localhost:52773/run/IrisNewman.Example.TestMethods/InsertPerson

 

-CI/CD USEFUL ENDPOINT:

New route to CI/CD:
You can add this endpoint to your workflows to send to Google Chat the result of the test automatly after every commit.
http://localhost:52773/pull_run_and_send_google

It download the last version of your IrisApiTester repository and download the last version of your test collection repository, run the test and send a message to a webhook of Google Chat with the url to the result test report.

In order to use these new improvements, you must complete the required data in the repository.cfg file.

repository.cfg example:

[repo]
# platform (Currently only is supported 'gitbub' and 'bitbucket')
platform = 'github'
# repository user empty for public repositories.
username = ''
# repository token empty for public repositories
apptoken = ''
# url repository 
# Example bitbucket: 'bitbucket.org/projectName/repoName.git'
# Example github:    'https://github.com/userName/repoName.git'
repository = 'https://github.com/daniel-aguilar-garcia/postman-collection-test.git'
# repository name
repository_name = 'postman-collection-test'
# collection path into the repository
collection_path = 'postman/collections/Test.json'
# webhook google chat
webhook_google = 'https://chat.googleapis.com/v1/spaces/AAAA2PmVItg/messages?key=XXXYYYzzzzz'

 

Here you can find a example of a Postman Collection repository:

https://github.com/daniel-aguilar-garcia/postman-collection-test

This repo also contains an example of a CI/CD feature in a Github workflow, file: ../workflows/launch_test.yml

 

I hope you enjoy these new features.

If you like this app you can vote for it in the Python Contest

 

Thanks for reading!

Discussion (0)1
Log in or sign up to continue