Hi,
I have in my Test Suite some Test Cases with IF conditions, so when the conditions aren't fulfilled Ranorex ignore the test case which is correct but in the report there is a grey part in the chart pie.
Is there a set up in Ranorex or a way to turn the Blocked status of the ignored test cases to Success or to remove the grey part in the chart pie?
Thank you.
Remove the grey part of blocked test cases in the report chart pie
-
- Posts: 12
- Joined: Mon May 03, 2021 12:44 pm
Re: Remove the grey part of blocked test cases in the report chart pie
No, there isn't.
There is a thread somewhere talking about this being non-ideal, which may go into more detail about it. I agree with you, it's confusing seeing 55 blocked results because of conditions applying - I have that problem here.
There is a thread somewhere talking about this being non-ideal, which may go into more detail about it. I agree with you, it's confusing seeing 55 blocked results because of conditions applying - I have that problem here.
-
- Posts: 12
- Joined: Mon May 03, 2021 12:44 pm
Re: Remove the grey part of blocked test cases in the report chart pie
I see, thanks for responding.
I guess i'll just try to do that using code
I guess i'll just try to do that using code
Re: Remove the grey part of blocked test cases in the report chart pie
Hi,
I'm afraid, the only workaround is not to use conditions in test suite and enable/disable tests cases/smart folders from code. I'm using technique, described in this post:
stop-running-module-on-condition-t10269.html#p45267
Hope this helps?
I'm afraid, the only workaround is not to use conditions in test suite and enable/disable tests cases/smart folders from code. I'm using technique, described in this post:
stop-running-module-on-condition-t10269.html#p45267
Hope this helps?
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
-
- Posts: 12
- Joined: Mon May 03, 2021 12:44 pm
Re: Remove the grey part of blocked test cases in the report chart pie
Hi odklizec,
Thank you that's exactly what I did, I switched between enabling and disabling testcases/smartfolders according to the condition ( my condition was to check whether a variable is true or false so I added a module variable inside the code and bind it to its specified column in the DataSource)
For people who might need to know, the code would be something like this :
Thank you that's exactly what I did, I switched between enabling and disabling testcases/smartfolders according to the condition ( my condition was to check whether a variable is true or false so I added a module variable inside the code and bind it to its specified column in the DataSource)
For people who might need to know, the code would be something like this :
Code: Select all
if(Variable == "value") {
//the following line enables the TestCase/SmartFolder
TestSuite.Current.GetTestContainer("NameOfTC/SF").Checked = true;
}
else {
//the following line disables the TestCase/SmartFolder
TestSuite.Current.GetTestContainer("NameOfTC/SF").Checked = false;
}
Re: Remove the grey part of blocked test cases in the report chart pie
Be aware when you use TestSuite.Current that this only works when the code module is executed by a Test Suite. If you're developing/debugging in the editor in isolation of a Test Suite - i.e. by hitting the Run button - then TestSuite.Current returns null, which will lead to an object not set to a reference error. Been there/done that so many times!
I too use this technique to optionally turn some tests off e.g. "don't run this particular test on an x64 build," or "don't run this test on a debug build," though I have to be careful to organise my steps into folders because the sibling steps continue to run in the way I tend to use it - ISTR I often put these in our [Setup] blocks perhaps. In our case such code modules tend to look at environmental stuff rather than datasources.
I too use this technique to optionally turn some tests off e.g. "don't run this particular test on an x64 build," or "don't run this test on a debug build," though I have to be careful to organise my steps into folders because the sibling steps continue to run in the way I tend to use it - ISTR I often put these in our [Setup] blocks perhaps. In our case such code modules tend to look at environmental stuff rather than datasources.
-
- Posts: 12
- Joined: Mon May 03, 2021 12:44 pm
Re: Remove the grey part of blocked test cases in the report chart pie
I see, thanks for the piece of advice