Validation - Comparing Two Output Files
Validation - Comparing Two Output Files
I looked in the help, and did not see anything regarding file comparison for validation. Is this available in Ranorex, and if so, how to end a recorded test with a validation that compares two files?
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Validation - Comparing Two Output Files
Hi!
Out of the box we have no file comparison method. But Ranorex provides you the whole Framework functionality of .Net, so you are able to code your own methods/classes and functions.
Please take a look on following article http://support.microsoft.com/?scid=kb%3 ... 8&x=19&y=9
This is a step by step tutorial how to create your own file comparison function.
To use this method in a Ranorex Recording, just add a User Code item to your Recording and add a Validation like:
Peter
Ranorex Support Team
Out of the box we have no file comparison method. But Ranorex provides you the whole Framework functionality of .Net, so you are able to code your own methods/classes and functions.
Please take a look on following article http://support.microsoft.com/?scid=kb%3 ... 8&x=19&y=9
This is a step by step tutorial how to create your own file comparison function.
To use this method in a Ranorex Recording, just add a User Code item to your Recording and add a Validation like:
Validate.AreEqual(YourClass.FileCompare("File1.txt","File2.txt"),true,"File comparison",true);Regards,
Peter
Ranorex Support Team
Re: Validation - Comparing Two Output Files
Thanks. That worked out very well. I didn't realize that you can create C# classes and call them from within the testing script. Very nice.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Validation - Comparing Two Output Files
That's because actually the so-called testing "script" is pure C# code. Ranorex is a .NET library and all of your test "scripts" are .NET assemblies as well, consequently, you can use all of the features of the .NET Framework inside your testing code.jeffs wrote:I didn't realize that you can create C# classes and call them from within the testing script.
Regards,
Alex
Ranorex Support Team