Setting global parameter

Bug reports.
Posts: 1
Joined: Thu Jun 23, 2016 10:50 am

Setting global parameter

Post by Ranolaf » Thu Dec 14, 2017 4:40 pm

Steps to reproduce:
- create global paramater in Testsuite-Context
- place a smartFolder under Testsuite
- create a Testcase in smartFolder above
- create setup-region in Testcase above
- create a own CodeModule in Setup-region
- reading global Parameter with Testsuite.Current.Parameters["parameter_xy"] works fine
- setting global Parameter with same Codeline in same CodeModule will be lead to an exception "unknown key"

In other cases setting the global Parameter works fine (e.g global Parameter of a smartFolder). Only this case is differnt. Any ideas?

User avatar
Support Team
Site Admin
Site Admin
Posts: 12169
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA

Re: Setting global parameter

Post by Support Team » Fri Dec 15, 2017 4:30 pm

Hi Ranolaf,

Thank you for reporting this issue.

Unfortunately, I was not able to reproduce this behavior in the current version of Ranorex (8.0) using the following structure
gpIssue.jpg (9.13 KiB) Viewed 1647 times
and using the following code
Report.Info("Value", TestSuite.Current.Parameters["Global"].ToString());
TestSuite.Current.Parameters["Global"]="New Value";
Report.Info("Value", TestSuite.Current.Parameters["Global"].ToString());
gpIssueReport.jpg (33.21 KiB) Viewed 1647 times
May I ask you which version of Ranorex you are currently using? If possible, please also attach a short sample project that allows us to reproduce the issue locally.

Thank you in advance.

Markus (S)