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.

Using Quality Center Field value for SOAtest script execution

Options
LegacyForum
LegacyForum Posts: 1,664 ✭✭
edited December 2016 in SOAtest
SOATest 5.5.3 and QC API
Hi


I am using HP Quality Center10.0 for executing my Parasoft SOATest Script using the Javascript API of SOATest-QC.

I wanted to use the value of a field in Quality Center Test Plan Details tab.

Basically:

I have added a field in Quality Center 10.0 Test Plan -->Details Tab.

Field Name is SOAEnvironment(Drop Down List) having value like CERT,STAGE,PROD.

I wanted user to Select one of the value in the above field.

Then use the Environment value (e.g CERT) with in the QC script like :

if (additionalArgs != "") {
args += " -environment " + additionalArgs;
//additionalArgs - stores the value of field SOAEnvironment.

}

Finally Create the CLI command like :

st.exe -cmd -runtest testSuite -reportHTML xmlReport -environment additionalArgs


So, could you please let me know how can I access this required from the Javascript within QC?
Any Pointer on the above appreciated.
Tagged:

Comments

  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭
    Options
    I believe you can access the field's value in your JavaScript by calling something like CurrentTest.Test.Field("SOME_FIELD_ID"). You would need to know the ID of your custom Test field. If you click Tools->Customize...->Project Entities then expand "Test->User Fields" then click the name of your custom Test field, you should see "Field Name". This may have some cryptic value such as "TS_USER_123" or something. This is the ID of your custom field.

    You can find more details about QC's API from "Help->Documentation Library->HP Quality Center Open Test Architecture API Reference". The Test object and its Field property are described in this OTA API reference.