Stack Overflow Asked by user4619697 on November 16, 2021
I am trying to programmatically (C#) overwrite the default generated contents of the Test Script tab for a QC/ALM VAPI-XP-TEST Test Plan.
I have been able to create/update the content of the Details, Design Steps, Parameters, etc tabs using code from the web, but cannot find refs on how to do the Test Script tab.
SOLUTION:
run the first 6 lines of code in step 5 to create a VAPI-XP-TEST.
In the created test > Test Script tab, go to the referenced Script path in Windows Explorer. Looks something like this:
C:Usersuser_idAppDataLocalTempTD_80ip_addresshex_codeTest
open any child node folder path all the way until you see a test.sr file
Copy the test.sr file to the same folder as your VB Script file
change C# code as follows:
TestFactory TF = qc.TestFactory; // qc is the ALM connection
Test test = (Test)TF.AddItem(System.DBNull.Value);
test["TS_NAME"] = "test name";
test["TS_TYPE"] = "VAPI-XP-TEST";
test["TS_SUBJECT"] = "Test Plan folder path/node id";
test.Post();
// add your script.vbs to Test Script tab of Test Plan test.
var es = test.ExtendedStorage;
es.ClientPath = "folder of your script.vbs and copied test.sr file";
es.Save("script.vbs, test.sr", true);
re-run your C# code and check Test Script tab of Test Plan test to see your VB script.
Answered by user4619697 on November 16, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP