Submit and vote on feature ideas.

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.

Not able to pick a user defined environment when run from Jenkins and pick the project from Git

Options
sansachie
sansachie Posts: 26

i am trying to pull .tst file along with .parasoft and .project file from Git and executing by putting all 3 files in one workspace. for this .tst file i have created 2 user defined environments which i will specifying in jenkins as a parameter. some how i am not able to run the .tst file and test fails with below error.

@echo off
cd C:\Program Files\Parasoft\SOAtest\9.10
echo.
soatestcli.exe -data "C:\Jenkins\workspace\REST_project" -config "user://QA2 BVT" -resource "REST_progect" -showdetails -report "C:\Jenkins\workspace\REST_project\Result\Result.html"
echo .. Running SOA Test completed.

Jenkins error :Error: Non-existent configuration QA2 BVT in workspace

Comments

  • benken_parasoft
    benken_parasoft Posts: 1,230 ✭✭✭
    Options

    The "-config" argument specifies the name of a test configuration, like what you see listed if you were to click "Parasoft > Test Configurations...". As the error message suggests, your workspace has no user test configuration named "QA2 BVT".

    Were you trying to set an active environment named "QA2 BVT" instead? If so, maybe you really meant to pass "-environment QA2 BVT" and maybe pass something else for "-config" like "user://Example Configuration" or "builtin://Demo Configuration"?

  • sansachie
    sansachie Posts: 26
    Options

    As the error message suggests, your workspace has no user test configuration named "QA2 BVT" ------my workspace has QA2 BVT,

    Normally, if i execute from CMD with above mentioned command, the test suit runs whatever is the specified in (-config "user://QA2 BVT"),

    On the contrary, if i create a new workspace by simply copying .tst file, .parasoft and .project file .... i am not seeing the user defined configurations in this newly created workspace... could you please let me know why is it?

  • jakubiak
    jakubiak Posts: 798 admin
    Options

    If you are creating a new workspace on the fly, you need to run soatestcli with -import to import the project you want to test, and then run soatestcli a second time to actually run the tests. Did you run -import first? See the documentation about -import here: https://docs.parasoft.com/display/SOAVIRT9106/CLI+Options

  • benken_parasoft
    benken_parasoft Posts: 1,230 ✭✭✭
    edited February 2019
    Options

    Normally, if i execute from CMD with above mentioned command, the test suit runs whatever is the specified in (-config "user://QA2 BVT"),

    Where is the test configuration named "QA2 BVT"? Did you export that to a property file? If so, you need to specify the path to the file for the "-config" argument instead of prefixing it with "user://".

  • sansachie
    sansachie Posts: 26
    Options

    Where is the test configuration named "QA2 BVT" ---it is in Parasoft > Test Configurations

  • benken_parasoft
    benken_parasoft Posts: 1,230 ✭✭✭
    edited February 2019
    Options

    it is in Parasoft > Test Configurations

    Yes, test configurations are configured from there. If you have a test configuration named "QA2 BVT" then you it would need to it to show up there in whatever workspace you are using. That dialog also has options to export/import test configuration to/from a properties file. So, if you created the test configuration in one workspace then you could export it to a properties file for import to another workspace.

    When using soatestcli, the "-config" argument is how you specify the test configuration. You must specify one that is actually present for the workspace you are using (the workspace is specified with the -data argument). User defined test configuration would be specified as soatestcli -config "user://QA2 BVT" whereas built-in ones like "Demo Configuration" would be specified as soatestcli -config "builtin://Demo Configuration". However, for automation purposes it can be nice to reference a test configuration that was previously exported to a property file on disk. In that case you can also specify a file path to the properties file as in soatestcli -config "some/file/path/my_test_config.properties"