Micro Focus QTP (UFT) Forums
Adding Category to QC to trigger Environment in Automated tests - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Adding Category to QC to trigger Environment in Automated tests (/Thread-Adding-Category-to-QC-to-trigger-Environment-in-Automated-tests)



Adding Category to QC to trigger Environment in Automated tests - today14u - 09-24-2009

Hey Guys,

I had this working in earlier versions of QTP / QC

I created a new look up list in QC to list out the various environments I need to run my scripts against (example - Functional test environment, Production, Demo). The way we had it set up in the past was by creating a Test called "Environmental Switch" which contained the following code:

Code:
Dim TS_Test
Set TS_Test = QCUtil.CurrentTestSetTest

reporter.ReportEvent micDone, "The Environment to be used: ", TS_Test.field("TC_USER_01")

If TS_Test.field("TC_USER_01") = " " Then
    environment("env_") = "Production"
End If
environment("env_") = TS_Test.field("TC_USER_01")

RunAction "Login Root [LoginRoot]", oneIteration

Basically the testsettest from what I can see has become the Test Instance Project entity in QC.

After having set this up I call it from my Routine Log in Script. Now I can not get it working as I have upgraded to both the latest versions of QC / QTP. Any Ideas here?