Author Topic: Adding tests to test set issue.  (Read 6258 times)

Offline Always Learner

  • Jr. Member
  • **
  • Posts: 66
    • http://
Adding tests to test set issue.
« on: October 26, 2009, 04:01:51 am »
Hi i am trying to add a test to testset present in a folder , when i do so i am getting a error while giving the ID to the test.Here is my script , please advice.

                Set tdc = QCUtil.QCConnection

       Set testSetFolderF = tdc.TestSetTreeManager

   set labfolder = testSetFolderF.NodeByPath("Root\Folder Test Folder")


   Set TstSet1 = labfolder.FindTestSets("Sample Test Set")

   Set TstSet = TstSet1.Item(1)

   Set testInstanceF = TstSet.TSTestFactory

   Set tstInstance = testInstanceF.AddItem(Null)

   tstInstance.id = 101 'The error i get is "wrong number of arguments or invalid property assignment"

   tstInstance.Post





Offline Tarun Lalwani

  • Administrator
  • Hero Member
  • *****
  • Posts: 3025
    • KnowledgeInbox
Re: Adding tests to test set issue.
« Reply #1 on: October 26, 2009, 04:06:38 am »
Try this rather

Set tstInstance = testInstanceF.AddItem("101")
Regards,
Tarun
KnowledgeInbox Administrator

KnowledgeInbox" style="border:0

Offline Always Learner

  • Jr. Member
  • **
  • Posts: 66
    • http://
Re: Adding tests to test set issue.
« Reply #2 on: October 26, 2009, 04:16:23 am »
Thanks Tarun , This works .
How to  name the test  ?
 by default it gives name as "[1]SY03 test with CA flag set to Y".

Offline Tarun Lalwani

  • Administrator
  • Hero Member
  • *****
  • Posts: 3025
    • KnowledgeInbox
Re: Adding tests to test set issue.
« Reply #3 on: October 26, 2009, 04:17:18 am »
TestLab does not allow you to change the name. The name is always referred from the Test Plan Name
Regards,
Tarun
KnowledgeInbox Administrator

KnowledgeInbox" style="border:0

Offline Always Learner

  • Jr. Member
  • **
  • Posts: 66
    • http://
Re: Adding tests to test set issue.
« Reply #4 on: October 26, 2009, 04:21:25 am »
But I don't have this test in the Test Plan .  It is present only in the test lab.

Offline Tarun Lalwani

  • Administrator
  • Hero Member
  • *****
  • Posts: 3025
    • KnowledgeInbox
Re: Adding tests to test set issue.
« Reply #5 on: October 26, 2009, 04:22:49 am »
Right click on the test in Test Set and select Go to Test Plan. You will find the is there in Test Plan
Regards,
Tarun
KnowledgeInbox Administrator

KnowledgeInbox" style="border:0

Offline Always Learner

  • Jr. Member
  • **
  • Posts: 66
    • http://
Re: Adding tests to test set issue.
« Reply #6 on: October 26, 2009, 04:29:20 am »
Thanks Tarun,
yes , it goes to the test in the test plan.

As far as i understand , i am adding a test instance of id 101 from test plan to test lab.But i am trying to create a new test in the test set (test lab)which is not present in the test plan.

Offline Tarun Lalwani

  • Administrator
  • Hero Member
  • *****
  • Posts: 3025
    • KnowledgeInbox
Re: Adding tests to test set issue.
« Reply #7 on: October 26, 2009, 04:31:32 am »
That is not possible in QC. You need to have the Test in Test Plan to be able to add it to Test Lab
Regards,
Tarun
KnowledgeInbox Administrator

KnowledgeInbox" style="border:0

Offline Always Learner

  • Jr. Member
  • **
  • Posts: 66
    • http://
Re: Adding tests to test set issue.
« Reply #8 on: October 26, 2009, 04:36:01 am »
Ok.

Thanks Tarun . appreciate Your help.

Offline Always Learner

  • Jr. Member
  • **
  • Posts: 66
    • http://
Re: Adding tests to test set issue.
« Reply #9 on: October 26, 2009, 04:41:39 am »
Do we have any way to replicate the test plan folder and tests in Test Lab ?

Offline Tarun Lalwani

  • Administrator
  • Hero Member
  • *****
  • Posts: 3025
    • KnowledgeInbox
Re: Adding tests to test set issue.
« Reply #10 on: October 26, 2009, 04:50:17 am »
You mean add all Tests in a Test Folder present in Test Plan to a Test Set located in Test Lab
Regards,
Tarun
KnowledgeInbox Administrator

KnowledgeInbox" style="border:0

Offline Always Learner

  • Jr. Member
  • **
  • Posts: 66
    • http://
Re: Adding tests to test set issue.
« Reply #11 on: October 26, 2009, 05:04:14 am »
Not all the tests , i meant selected folders from test plant to testlab.

Offline Tarun Lalwani

  • Administrator
  • Hero Member
  • *****
  • Posts: 3025
    • KnowledgeInbox
Re: Adding tests to test set issue.
« Reply #12 on: October 26, 2009, 05:05:40 am »
Folder has no meaning in a TestSet, it is the test insider the folder that is added. So you want all tests from selected folders...right?
Regards,
Tarun
KnowledgeInbox Administrator

KnowledgeInbox" style="border:0

Offline Always Learner

  • Jr. Member
  • **
  • Posts: 66
    • http://
Re: Adding tests to test set issue.
« Reply #13 on: October 26, 2009, 05:56:52 am »
Yes ,
Now what i am doing is , i am creating a folder with same name in test plan and test lab.Then adding tests to test plan folder .Creating a test set in tes lab folder and then i am trying to get the id of the test which is present in the fodler of test plan and adding it to test set od test lab.
But i am unable to get the id of the test present in the test plan.

Offline Tarun Lalwani

  • Administrator
  • Hero Member
  • *****
  • Posts: 3025
    • KnowledgeInbox
Re: Adding tests to test set issue.
« Reply #14 on: October 26, 2009, 06:02:34 am »
Use the TestFactory object on the Node from TestPlan and then enumerate through all the Tests using NewList method. In enumeration you can get all the ids and add them 1 by 1 to the TestSet
Regards,
Tarun
KnowledgeInbox Administrator

KnowledgeInbox" style="border:0