Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to trigger integration tests(placed in separate repository) within a yml file?

vasundhara June 4, 2019

I have access to Repository1 which is used by the DEV team and I have a separate Repository2 in which I have placed my Integration tests.

 

Query: How can I trigger my integration tests from the YML file in Repository1, so that my integration tests are run immediately after the deployment step is complete?

 

Additional Information: I have my test scripts in NodeJS and have used Mocha and Chai along with Selenium.

1 answer

1 accepted

1 vote
Answer accepted
Philip Hodder
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 11, 2019

Hi Vasundhara.

You'll need to set up a Bitbucket Pipelines configuration in each of your repositories. In your integration test repository (Repository2), you can set it up to just run the integration tests.

In your DEV team repository (Repository1) you can then set up a Pipelines, which triggers Repository2's Pipeline via the Bitbucket REST API. It can then wait for Repository2's pipeline to complete, and then read the result of that pipeline.

Thanks,

Phil

vasundhara June 12, 2019

Hi Phil,

Thank you for the quick response. I had some trouble in understanding the curl request, so, I used a workaround:

- step:

     name: Regression tests

     script:

         - pipe: atlassian/trigger-pipeline:2.0.0

           variables:

                BITBUCKET_USERNAME: $BITBUCKET_USERNAME 

                BITBUCKET_APP_PASSWORD: $BITBUCKET_APP_PASSWORD

                REPOSITORY: '{repository_name}'

                BRANCH_NAME: 'master'

                WAIT: 'true'

                WAIT_MAX_TIMEOUT: '20000'

Thanks again!

Like Philip Hodder likes this
Philip Hodder
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 12, 2019

Ah! I forgot we have a Pipe for that. Great to see you got it working.

vasundhara June 12, 2019

Thanks :)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events