Hi,
My current scenario is, I email a group of people after running a test.
1. I tried adding a global parameter (devmode = boolean). I trigger this test through a batch file, is it possible to pass on this variable through the batch file itself to ranorex agent?
2. Also, use a global parameter to enable and disable the email tear down
Thanks in advance
Tear down based on global parameter
Re: Tear down based on global parameter
Hi,
1) I believe that all Ranorex command line parameters, should work just fine with agent command line? So this example should set a given value to global parameter and run test on agent of your choice?
1) I believe that all Ranorex command line parameters, should work just fine with agent command line? So this example should set a given value to global parameter and run test on agent of your choice?
As for second question, I'm sure this could be done in code Please search the forum for setup/teardown code examples. I'm sure I remember a discussion, regarding disbabling setup/teardown section of test suite/test case.Test.exe /pa:devmode =true /a:"AgentName"
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
Re: Tear down based on global parameter
tried it, getting this error:
Failed to set value 'false' to variable 'DevMode'.
Field or property not found or not writeable.
Batch looks like below: test.exe /pa:DevMode=true /rc:PD_RegressionTest /rf:myReports\\%%R_%%Y-%%M-%%D-%%T-%%X
Failed to set value 'false' to variable 'DevMode'.
Field or property not found or not writeable.
Batch looks like below: test.exe /pa:DevMode=true /rc:PD_RegressionTest /rf:myReports\\%%R_%%Y-%%M-%%D-%%T-%%X
Re: Tear down based on global parameter
Hi,
Are you sure there is defined global parameter DevMode in 'test' solution?
Are you sure there is defined global parameter DevMode in 'test' solution?
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
Re: Tear down based on global parameter
All I did was added a global parameter and on the teardown email module, added a boolean variable and bound it to the global parameter.
The case is same throughout, so don't see why I would get this message.
One thing to note is , this parameter was previously devMode, which I then renamed it
Test.exe /pa:DevMode=FALSE/rc:PD_RegressionTest /rf:myReports\\%%R_%%Y-%%M-%%D-%%T-%%X
Failed to set value 'FALSE' to variable 'devMode'.
Field or property not found or not writeable.
Show/Hide Stacktrace
at Ranorex.Core.Data.ReflectionDataProvider.SetValue(CaseInsensitiveString variableName, String value, Boolean exceptionOnFail)at Ranorex.Core.Data.ReflectionDataProvider.SetValue(CaseInsensitiveString variableName, String value)at Ranorex.Core.Testing.TestModuleLeaf.ReportAndAddBindingToActivityStack(ReflectionDataProvider refDataProvider)at Ranorex.Core.Testing.TestModuleLeaf.RunInternal(DataContext parentDataContext, Int32 iteration, Int32 iterationCount, Boolean skipIteration)
The case is same throughout, so don't see why I would get this message.
One thing to note is , this parameter was previously devMode, which I then renamed it
Test.exe /pa:DevMode=FALSE/rc:PD_RegressionTest /rf:myReports\\%%R_%%Y-%%M-%%D-%%T-%%X
Failed to set value 'FALSE' to variable 'devMode'.
Field or property not found or not writeable.
Show/Hide Stacktrace
at Ranorex.Core.Data.ReflectionDataProvider.SetValue(CaseInsensitiveString variableName, String value, Boolean exceptionOnFail)at Ranorex.Core.Data.ReflectionDataProvider.SetValue(CaseInsensitiveString variableName, String value)at Ranorex.Core.Testing.TestModuleLeaf.ReportAndAddBindingToActivityStack(ReflectionDataProvider refDataProvider)at Ranorex.Core.Testing.TestModuleLeaf.RunInternal(DataContext parentDataContext, Int32 iteration, Int32 iterationCount, Boolean skipIteration)
Re: Tear down based on global parameter
Hi,
I think the problem is, that Ranorex parameters (either global params or test case/smart folder params) are strings! So boolean variable used in code will not work with string parameter! You must either replace the boolean variable with string variable or convert content of binded string param to boolean.
I think the problem is, that Ranorex parameters (either global params or test case/smart folder params) are strings! So boolean variable used in code will not work with string parameter! You must either replace the boolean variable with string variable or convert content of binded string param to boolean.
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
Re: Tear down based on global parameter
Hi,
This is how it looks :
Email module:
[TestVariable("90e8e15f-75e2-485f-9b97-25af980d5ec9")]
public bool DevMode { get; set; }
rxtst:
<param
name="DevMode"
value="FALSE">
</param>
This is how it looks :
Email module:
[TestVariable("90e8e15f-75e2-485f-9b97-25af980d5ec9")]
public bool DevMode { get; set; }
rxtst:
<param
name="DevMode"
value="FALSE">
</param>
Re: Tear down based on global parameter
Hi,
If possible, please post entire solution. Thanks.
As I mentioned in previous post, Ranorex parameters are ALWAYS strings! It does not matter you created bool module variable. String parameter binded to bool variable will most probably not work
If possible, please post entire solution. Thanks.
As I mentioned in previous post, Ranorex parameters are ALWAYS strings! It does not matter you created bool module variable. String parameter binded to bool variable will most probably not work
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration