Ask a Question

Test Item Parameter Value Not Getting Stored During Test Run

SOLVED
RileyMartinez
Occasional Contributor

Test Item Parameter Value Not Getting Stored During Test Run

Maybe I'm missing something obvious, but I feel like this should be working. I read the documentation on Test Items, and believe I'm using this feature correctly.

 

I am attempting to pass a boolean value as a parameter to a test case, so that it either runs or doesn't run the function getAndLogTesterInfo(). When running the debugger the parameter value that I set for the test item is not being stored at runtime.

 

This is the test item that I'm running, with the parameter userformEnabled of type boolean set to True:

 

test_item_c304.png

 

 

 

test_parameter.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

This is the script code at runtime while using the debugger. As you can see at the bottom, the variable userFormEnabled does not have any value stored, causing it to pass over the if-statement.

 

userform_no_value.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Any advice would be much appreciated! Thank you.

3 REPLIES 3
AlexKaras
Champion Level 3

Hi,

 

Hm... Wierd... I see nothing incorrect with either test setup or test code...

Try to ask Support directly via the https://support.smartbear.com/message/?prod=TestComplete form. (And reference this thread)

 

P.S. Just to be on the safe side: I am assuming that you are executing test item, not just the c304 function.

 

Regards,
  /Alex [Community Champion]
____
[Community Champions] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Champions]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
https://community.smartbear.com/t5/Community-Champions/About-the-Community-Champions-Program/gpm-p/252662
================================
RileyMartinez
Occasional Contributor

Thanks for the reply Alex. It turns out that there was a semantical error on my part that I wasn't catching. I needed to place the if statement before my common.preTest() statement. The feature and function now work fine after that. Would you happen to know the best way that I can go about closing out this post?

Hi,

 

Good to know that the problem is solved.

Actually, the thread is considered to be closed as soon as you marked some post as an acceptable solution.

 

Regards,
  /Alex [Community Champion]
____
[Community Champions] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Champions]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
https://community.smartbear.com/t5/Community-Champions/About-the-Community-Champions-Program/gpm-p/252662
================================
cancel
Showing results for 
Search instead for 
Did you mean: