cancel
Showing results for 
Search instead for 
Did you mean: 

Test Item Parameter Value Not Getting Stored During Test Run

SOLVED
Highlighted
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.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Occasional Contributor

Re: Test Item Parameter Value Not Getting Stored During Test Run

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?

View solution in original post

3 REPLIES 3
Highlighted
Community Hero

Re: Test Item Parameter Value Not Getting Stored During Test Run

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 Hero]
____
[Community Heroes] 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 Heroes]
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 Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
Highlighted
Occasional Contributor

Re: Test Item Parameter Value Not Getting Stored During Test Run

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?

View solution in original post

Highlighted
Community Hero

Re: Test Item Parameter Value Not Getting Stored During Test Run

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 Hero]
____
[Community Heroes] 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 Heroes]
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 Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors