Diff tool file comparison

LegacyForumLegacyForum Posts: 1,669 ✭✭
edited December 2016 in SOAtest
Hi! I'm encountering a problem when using the diff tool for file comparison, hope you can help me out!


I have setup my test like this:


1. There is a file data source, each file contains a database query. The database tool component iterates through the data source. Each query results in one or more rows. The output of each query is transformed with a xslt tool.

2. There is also a second file data source which contains XML files with 'expected' results. The structure is the same, each file contains the output of a single query.


What I would like to do is create a setting where the output of each query from the test is compared 'one by one' with the corresponding file of the second file data source.


Option 1. When the diff tool is directly connected to the output of the xslt tool, this results in a test, where all files from the xslt output are compared against all files from the second file data source. I can't seem to change the relation of comparison here, but I would like to compare the output of each query with the corresponding file of the file data source.


Option 2. Another option is writing the xslt output in files. The test then should be set as 'setup' type. A third file data source is added which contains the output files that the test should write. An aggregate data source is added which contains the second and third file data source together.

The diff tool is now placed in a separate test suite. The input iterates trough the third data source (via the aggregate data source), the regression control iterates through the second data source (also via the aggregate data source). The problem now is, that I receive error messages like 'The input content that the Diff tool received is not well-formed XML:""'. I checked the messages from both data sources, but they are all well-formed. I also found out that the diff tool reads both file data sources on the regressions control 'side' correctly. The input 'side' doesn't seem to handle the data source at all, not even when both 'sides' are attached to one (the same) file data source.


Could you please help me out with this problem? The goal of the test here is to report the differences between the files, so the use of a method tool wouldn't do the trick here. Or maybe it could, but then I have to write my own diff tool, which is not desired.
Tagged:

Comments

  • LegacyForumLegacyForum Posts: 1,669 ✭✭
    Hi AlexKuperus,

    You can do this by just setting up the DB Tool and attached XSLT, then right-click on the DB Tool and choose Create / Update Regression Control. In the wizard that opens, select Create Regression Control > Create Multiple Controls > Create External Regression Controls and click Finish. This will run the test, perform transformations, and save the results (you can look in the Messages window to see where these files were saved). Now, whenever you run the test, each transformed Result will be compared with the correlating file.

    You can also replace the contents of these files if you like - just open them with a text editor and replace their contents with your expected data.
  • LegacyForumLegacyForum Posts: 1,669 ✭✭
    edited December 2016
    Thanks for your support Brian!
Sign In or Register to comment.