Remove the grey part of blocked test cases in the report chart pie

Ask general questions here.
s.abdourafiq
Posts: 12
Joined: Mon May 03, 2021 12:44 pm

Remove the grey part of blocked test cases in the report chart pie

Post by s.abdourafiq » Wed May 19, 2021 2:01 pm

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.

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

Re: Remove the grey part of blocked test cases in the report chart pie

Post by Stub » Wed May 19, 2021 3:58 pm

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.

s.abdourafiq
Posts: 12
Joined: Mon May 03, 2021 12:44 pm

Re: Remove the grey part of blocked test cases in the report chart pie

Post by s.abdourafiq » Wed May 19, 2021 5:01 pm

I see, thanks for responding.

I guess i'll just try to do that using code :(

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Remove the grey part of blocked test cases in the report chart pie

Post by odklizec » Thu May 20, 2021 9:14 am

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?
Pavel Kudrys
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

s.abdourafiq
Posts: 12
Joined: Mon May 03, 2021 12:44 pm

Re: Remove the grey part of blocked test cases in the report chart pie

Post by s.abdourafiq » Fri May 21, 2021 12:08 pm

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 :

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;
        	}
  

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

Re: Remove the grey part of blocked test cases in the report chart pie

Post by Stub » Fri May 21, 2021 1:30 pm

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.

s.abdourafiq
Posts: 12
Joined: Mon May 03, 2021 12:44 pm

Re: Remove the grey part of blocked test cases in the report chart pie

Post by s.abdourafiq » Fri May 21, 2021 3:38 pm

I see, thanks for the piece of advice :)