Can I determine whether current component is executed from ALM's test lab, or interactively?

0
0

Can I determine (programmatically) how my current business component scriptcode has been initiated?

It could be

  • standalone (using “Run” from UFT’s toolbar while the component is open)
  • from a standalone test execution (using “Run” from UFT’s toolbar while a test calling the component is open)
  • from a test lab execution (using “Run” or “Run all” button in the test set im ALM)?

Foggily related: Can I determine if current test execs from test lab or interactively from within QTP IDE?

  • You must to post comments
0
0

If the component is executed standalone, CreateObject ("QuickTest.Application").CurrentDocumentType returns "Business component".

If the component is executed from within a BPT (no matter if the BPT is executed interactively, or from within a test set) CurrentDocumentType returns "Test".

Combined with the setting brought to light in the related question (and answer), this answers the question. It’s as simple as that.

  • You must to post comments
Showing 1 result
Your Answer
Post as a guest by filling out the fields below or if you already have an account.
Name*
E-mail*
Website