Page 1 of 1

Ranorex Report and test status monitoring

Posted: Tue Nov 29, 2011 2:27 pm
by swmatisa
WinXP SP3 (WindowsUpdate done)
Ranorex 3.1.2
*********************************
Hello,

I try to create a status (x Success, y Failed, z Blocked) to monitor the progress of my tests. To do this I try to use the IReportBuilder Interface.

To be sure how you present your results (in the rapport), I do a sample :
RanorexReport.png
I log all call to LogText-LogData and I found the following rules :
1) Treat when metaInfos contains (key, value) activity;testcaseiteration
2) Treat when metaInfos contains (key, value) activity;testcase except if last call contain activity;testcaseiteration

Are the following rules OK?

Best regards

Re: Ranorex Report and test status monitoring

Posted: Wed Nov 30, 2011 2:36 pm
by swmatisa
Hello,

I implement a class with IReportBuilder Interface. I can now see remotely (with an UdpClient) the number of passed, failed, blocked tests.

I also add the "pause and play" for running project.

Thanks for this great product

Re: Ranorex Report and test status monitoring

Posted: Wed Feb 01, 2012 3:25 pm
by Pavlo
swmatisa wrote:Hello,

I implement a class with IReportBuilder Interface. I can now see remotely (with an UdpClient) the number of passed, failed, blocked tests.

I also add the "pause and play" for running project.

Thanks for this great product
Hi
"Great mind think same"
I'm going to implement something like you did.
Can you share your solution or give bit more details on how you did that?

-regards
Pavlo

Re: Ranorex Report and test status monitoring

Posted: Wed Feb 01, 2012 3:54 pm
by swmatisa
Pavlo wrote:Can you share your solution or give bit more details on how you did that?
Sorry, I cannot give my full project, but some abstract.

You must treat each IReportLogger.LogText and IReportLogger.LogData with something like this:
...
		const string k_Activity = "activity";
		const string k_Testcase = "testcase";
		const string k_TestcaseIteration = "testcaseiteration";
		const string k_Result = "result";
		const string k_Resultfailed = "Failed";
		const string k_ResultIgnored = "Ignored";
		const string k_ResultSuccess = "Success";
...
			bool l_Treat = false;
			if (!metaInfos.ContainsKey(k_Activity))
			{
				return;
			}
			switch (metaInfos[k_Activity])
			{
				case k_Testcase:
					l_Treat = !m_LastOperationIteration;
					m_LastOperationIteration = false;
					break;
				case k_TestcaseIteration:
					l_Treat = true;
					m_LastOperationIteration = true;
					break;
				default:
					m_LastOperationIteration = false;
					break;
			}

			if (l_Treat)
			{
				switch (metaInfos[k_Result])
				{
					case k_ResultSuccess:
						m_Passed++;
						break;
					case k_Resultfailed:
						m_Failed++;
						break;
					case k_ResultIgnored:
						m_Blocked++;
						break;
					default:
						// Do Nothing
						break;
				}
				SendUpdate();  // Send m_Passed, m_Failed, etc. by ...
I hope this help :D

Re: Ranorex Report and test status monitoring

Posted: Wed Feb 01, 2012 6:03 pm
by Pavlo
Thanks!!!

May be you also can share couple of lines for pausing/resuming tests?

Re: Ranorex Report and test status monitoring

Posted: Thu Feb 02, 2012 10:51 am
by swmatisa
Pavlo wrote:May be you also can share couple of lines for pausing/resuming tests?
You must treat each IReportLogger.LogText and IReportLogger.LogData with something like this:

The principle is to check if a "Pause" command has been sent and after wait on "Resume" command (pseudo code):

Code: Select all

if PauseSent
	While !ResumeSent
		Sleep
	endwhile
endif
TreatmetaInfos	// LastPost

Re: Ranorex Report and test status monitoring

Posted: Fri Feb 03, 2012 9:38 am
by Pavlo
Ah, OK
Thanks!!

I thought that you are using some ranorex method to pause test execution.

-re
Pavlo