Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

How to automate switching of environment between real and virtual

Nihar1991
Nihar1991 Posts: 52

Hi Team,

I have a requirement wherein every sprint i need to execute load test by pointing to the real and virtual environments.
so for that, someone needs to switch the environment and provision it in CTP every time.

But I need to remove the manual effort here.

Is there any way or any batch script where we can mention if load test is to execute on real then automatically by using any script it points to real and vice-versa?

I am hoping for some guidance or suggestion here if this kind of capability available in Parasoft or not.

Thanks
Nihar Ranjan Arisal

Comments

  • Matt Love
    Matt Love Posts: 97 admin

    Hi Nihar,
    It is possible to automate provisioning between real and virtual environments using the CTP REST API. You can view API documentation in CTP from the help menu.
    We also have a Jenkins plugin to do the same. See https://docs.parasoft.com/display/SVC20211/Environment+Manager+Plugin+for+Jenkins
    Best regards,
    Matt

  • Nihar1991
    Nihar1991 Posts: 52

    Hi Matt,

    Thanks for your quick response. i am now exploring this API. hope it will work.

    Thanks
    Nihar

  • Nihar1991
    Nihar1991 Posts: 52

    Hi Matt,

    I am able to automate the switching environment using Parasoft environment manager.

    But is there any way to parameterize for deploying the instances in Jenkins?

    what happens every time I need to go to the configure option and select the expected instance and build it.
    or I have to create multiple jobs for switching multiple instances of multiple environments.

    Please help me if there is any way to do this. please refer to the attached screenshot for the details.

    Thanks
    Nihar Arisal

  • Nihar1991
    Nihar1991 Posts: 52

    Hi Matt,

    I am able to automate the switching environment using Parasoft environment manager.

    But is there any way to parameterize for deploying the instances in Jenkins?

    what happens every time I need to go to the configure option and select the expected instance and build it.
    or I have to create multiple jobs for switching multiple instances of multiple environments.

    Please help me if there is any way to do this. please refer to the attached screenshot for the details.

    Thanks
    Nihar Arisal

  • Nihar1991
    Nihar1991 Posts: 52

    Hi Matt,

    I am able to automate the switching environment using Parasoft environment manager.

    But is there any way to parameterize for deploying the instances in Jenkins?

    what happens every time I need to go to the configure option and select the expected instance and build it.
    or I have to create multiple jobs for switching multiple instances of multiple environments.

    Please help me if there is any way to do this. please refer to the attached screenshot for the details.

    Thanks
    Nihar Arisal

  • Nihar1991
    Nihar1991 Posts: 52
    edited May 2021

    Hi Matt,

    I am able to automate the switching environment using Parasoft environment manager.

    But is there any way to parameterize for deploying the instances in Jenkins?

    what happens every time I need to go to the configure option and select the expected instance and build it.
    or I have to create multiple jobs for switching multiple instances of multiple environments.

    Please help me if there is any way to do this. please refer to the attached screenshot for the details.

    Thanks
    Nihar Arisal

  • Matt Love
    Matt Love Posts: 97 admin

    Hi Nihar,
    The Jenkins plugin does not allow the environment instances to be parameterized. You would have to create multiple jobs for multiple instances, or use a curl command to call the REST API in CTP directly with your parameters.

  • Nihar1991
    Nihar1991 Posts: 52

    Hi Matt,

    Thanks for your quick response. I am clear now.

    Thanks
    Nihar Arisal