This is a migrated thread and some comments may be shown as answers.

XML result comparation

3 Answers 66 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Manuel
Top achievements
Rank 1
Manuel asked on 03 Nov 2011, 05:44 PM
Hello,

I'm evaluating some test automation tools in order to chose the best that my company needs to test a web application. Now I'm evaluating Test Studio and for the moment I think it's the easiest and can cope easily with all the problems (Ajax dinamic load, emulate key in fileds, image comparation) I have found in other test tools.

I still have one doubt that I would like to know if it is possible to be done in Telerik Test Studio (we don't intend to use the VS pluging):

At some point of the test case an XML file is generated. We would like to compare if that the data in XML is compatible with another. For this we would like to call an external program from the Test Studio. This external program would compare the XMLs and return an error code that sould be logged by the Test Studio in the test case.

Is that possible to be done?.

Thanks

3 Answers, 1 is accepted

Sort by
0
Stoich
Telerik team
answered on 04 Nov 2011, 10:41 AM
Hello Manuel,
      you can definitely do that with Test Studio.

If you provide some additional details on the exact nature of the app I can give you details on the solution you can use.

Test Studio will allow you to write steps in C#/VB code as seen here:
http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/coded_steps.aspx

You can write your own code that triggers the application you need. Here's a simple example:
I found this article which details how to trigger a process in C# code. Here's the code that can do that:
System.Diagnostics.Process notePad = new System.Diagnostics.Process();
 
notePad.StartInfo.FileName   = "notepad.exe";
notePad.StartInfo.Arguments = @"c:\myText.txt";
 
notePad.Start();
 
I can simply put this code in a code step. I changed Process to System.Diagnostics.Process in order to avoid adding the "using" statement. You can add it if you like by using Class View (screenshot 1).
c:\myText.txt is the argument I feet to notepad.exe. I created this txt file in order to demonstrate this approach. You'll need to create create this file on your local system otherwise the Notepad application will throw an error "file can't be found".

You can also run batch files from a coded step much the same way.

I've attached the sample project to this email.

Alternatively if you want to use a custom .Net assembly in Test Studio Standalone here's how you can do that:
http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/coded_steps/add-an-assembly-reference.aspx

Let me know if you require additional assistance with this.

Best wishes,
Stoich
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Manuel
Top achievements
Rank 1
answered on 04 Nov 2011, 01:35 PM
Hello,

I haven't been able to open you attached example, because it tells me that it has been created with a newer version (2011.2.1026.0) and the one I have is the 2011.2.928.0 (downloaded two days ago). Anyway, knowing that is possible to do it with the tool is enough for me.

Thanks for your answer

0
Accepted
Stoich
Telerik team
answered on 04 Nov 2011, 01:55 PM
Hi Manuel,
    the project was created with the latest internal build of Test Studio. You can download it from your Telerik account (see screenshot).

All the best,
Stoich
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
General Discussions
Asked by
Manuel
Top achievements
Rank 1
Answers by
Stoich
Telerik team
Manuel
Top achievements
Rank 1
Share this question
or