<p>I am looking for a tool for regression testing a suite of equipment we are building.</p>

<p>The current concept is that you create an input file (text/csv) to the tool specifying inputs to the system under test. The tool then captures the outputs from the system and records the inputs and outputs to an output file. </p>

<p>The output is in the same format as the original input file and can be used as an input for following runs of the tool, with the measured outputs matched with the values from the previous run. </p>

<p>The results of two runs will not be exact matches, there are some timing differences that depend on the state of the battery, or which depend on other internal state of the equipment.</p>

<p>We would have to write our own interfaces to pass the commands from the tool to the equipment and to capture the output of the equipment.</p>

<p>This is a relatively simple task, but I am looking for an existing tool / package / library to avoid re-inventing the wheel / steal lessons from.</p>

[{'answer_id': 77684, 'author': 'apenwarr', 'author_id': 42219, 'author_profile': 'https://Stackoverflow.com/users/42219', 'pm_score': 0, 'selected': False, 'text': '<p>You can just use any test framework.  The hard part is writing the tools to send/retrieve the data from your test system, not the actual string comparisons.</p>\n\n<p>Your tests would just all look like this:</p>\n\n<pre><code>x = read_input_file(ifilename);\ny1 = read_expected_data(ofilename);\nsend_input_file_to_server();\ny2 = read_output_from_server();\ncheckequal(y1, y2)\n</code></pre>\n'}, {'answer_id': 77729, 'author': 'apenwarr', 'author_id': 42219, 'author_profile': 'https://Stackoverflow.com/users/42219', 'pm_score': 2, 'selected': False, 'text': '<p>I recently built a system like this on top of git (<a href="http://git.or.cz/" rel="nofollow noreferrer">http://git.or.cz/</a>).  Basically, write a program that takes all your input files, sends them to the server, reads the output back, and writes it to a set of output files.  After the first run, commit the output files to git.</p>\n\n<p>For future runs, your success is determined by whether the git repository is clean after the run finishes:</p>\n\n<pre><code>test 0 == $(git diff data/output/ | wc -l)\n</code></pre>\n\n<p>As a bonus, you can use all the git tools to compare differences, and commit them if it turns out the differences were an improvement, so that future runs will pass.  It also works great when merging between branches.</p>\n'}, {'answer_id': 84903, 'author': 'Eli Bendersky', 'author_id': 8206, 'author_profile': 'https://Stackoverflow.com/users/8206', 'pm_score': 1, 'selected': False, 'text': "<p>I'm not sure there will be a single package that exactly suits your needs. You have a few considerations to make:</p>\n\n<ol>\n<li>How to pass data to the equipment and how to collect it back. This is very application specific, but a usually good option is the old'n'good serial port (RS232) for which an easy interfact exists for any programming language.</li>\n<li>How to run the tests. A unit-testing framework can definitely help you here. The existing frameworks have a lot of the basic features implemented - selecting tests to run, selecting the detail-level of the report (very important for detailed debugging at first and production-stage PASS/FAIL analysis later on). I've had good experience using the test frameworks of both Perl and Python from testing embedded devices.</li>\n<li>You also have to decide how to make the comparisons. As you correctly noted, the results won't be equal. This is where your domain knowledge comes in. Usually, it is simply implemented using error margins that are applicable in your domain. Of course, you won't be able to use a basic <code>diff</code> tool and will have to write an intelligent script.</li>\n</ol>\n"}]
['https://Stackoverflow.com/questions/77582', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/13923/']