XML result comparation

4 posts, 1 answers
  1. Manuel
    Manuel avatar
    9 posts
    Member since:
    Nov 2011

    Posted 03 Nov 2011 Link to this post

    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
  2. Stoich
    Admin
    Stoich avatar
    1 posts

    Posted 04 Nov 2011 Link to this post

    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
  3. Manuel
    Manuel avatar
    9 posts
    Member since:
    Nov 2011

    Posted 04 Nov 2011 Link to this post

    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

  4. Answer
    Stoich
    Admin
    Stoich avatar
    1 posts

    Posted 04 Nov 2011 Link to this post

    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
Back to Top