User Specific Validations

Ask general questions here.
karthikprs
Posts: 6
Joined: Wed Jul 12, 2017 11:25 am

User Specific Validations

Post by karthikprs » Wed Aug 30, 2017 6:59 am

Hi,

I'm checking the feasibility of using Ranorex for my project. I'm trying to have custom validations using code modules for certain tests I perform rather than recording them. For Example,

My software decompresses zip files and does certain text processing on the extracted files.

My test here is intended to check whether the file has been successfully extracted from the zip file or not. So I would like to make it in such a way that the user code module checks for the number of files in the destination location with the expected file extension.

More or less like this (Code from my nunit test case written for the same purpose):

Code: Select all

Assert.IsTrue(dc.TotalDecompressFileCount == 1, "File count is other than 1 " + dc.TotalDecompressFileCount);
I would also like the final test report to display the results with much details in table format as per the attached image.
table.JPG
I request your help on the above mentioned case.

Thank you in Advance,
Karthik
You do not have the required permissions to view the files attached to this post.

Vaughan.Douglas
Posts: 254
Joined: Tue Mar 24, 2015 5:05 pm
Location: Des Moines, Iowa, USA

Re: User Specific Validations

Post by Vaughan.Douglas » Thu Sep 07, 2017 1:00 pm

I think you're not getting a helpful response because it's not very clear where you're actually running into trouble. Ranorex is built on the .Net framework, so anything (with few exceptions) you can do in Visual Studio you can also do in Ranorex user code.

You don't need to use the record feature, in general I avoid it when possible. You don't need to but you should use an object repository. I generally write all of my objects by hand as a human brain is better at generating RanorexPath than the object Spy.

Ranorex provides a validate class that should meet your needs, but if you don't like it you can find other options using the Nuget add-in.

As for displaying your results in a table like you've got, Ranorex allows you to create custom reports for such situations. I've never bothered with creating custom reports, so if you've got specific questions there you'll need to ask them to the community.
Doug Vaughan