Teststuite Parameters if you run the module

Ask general questions here.
RanoKarl
Posts: 7
Joined: Tue Mar 12, 2019 4:52 pm

Teststuite Parameters if you run the module

Post by RanoKarl » Wed Jul 31, 2019 11:21 am

Hello,

I try to access parameters from the Teststuite directly from Usercode.

If I run the module through the TestSuite, this works:

Code: Select all

TestSuite.Current.Parameters["XX"]
But if I run the module directly, TestSuite.Current returns null. I would like to access the parameters set in Teststuite -> Global Parameters.

Thx for the help ^^

User avatar
Stub
Posts: 266
Joined: Fri Jul 15, 2016 1:35 pm

Re: Teststuite Parameters if you run the module

Post by Stub » Thu Aug 01, 2019 7:49 am

When you "Run Code" directly from the code editor there simply is no Test Suite available. Hence null. This is normal behaviour. You need to test for this scenario and cope somehow that suits your needs. I assume default values when the Test Suite isn't available, for example.