<p dir="ltr">Thank you for sharing your experience!<br>
Worth an article!</p>
<div class="gmail_quote">On Mar 28, 2015 6:23 PM, "Peter" <<a href="mailto:p-santoro@sbcglobal.net">p-santoro@sbcglobal.net</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Outside of issue 701 that I reported just prior to the 2.7.0 release, I found no regressions in my usage of pytest (which I believe differs from the norm - see below).<br>
<br>
I use python with pytest to check for observational equivalence between actual and expected results of a business critical C#.NET application. My conftest.py script customizes py.test with fixtures that automate the running of selected tests and their subsequent analysis. This includes the driving and coordination of CLI and GUI .NET applications that were not designed to support automated testing.  This automated test facility also includes a package to extend pytest's functionality.  For example:<br>
<br>
- some fields (e.g. processing date) change with each run of the .NET application, which necessitates that certain fields in the actual and previously generated expected results are masked prior to using the built-in pytest assertions; I created a package to declaratively specify what fields are masked for various versioned record structures - the actual masking happens prior to using pytest assertions<br>
<br>
- the record structures for this .NET application are required via legacy downstream systems and are at least 5000 bytes long; if there are only one or two differences between the actual and expected results and the differences are close together, the built-in pytest assertions produce a nice report; if there are multiple differences and they are far from each other, the built-in pytest assertion report isn't very helpful; I added functionality to produce a list of the indices where values differ, which greatly simplifies troubleshooting<br>
<br>
The automated test facility that I built also includes a python application to automatically create automated test repository content for each test (i.e. test data, expected results, and the required py.test scripts).<br>
<br>
The benefits of using pytest in this manner are as follows:<br>
<br>
1) Creating good unit tests requires additional software development work - including testing the unit tests themselves.  That's fine, if you have sufficiently competent developers and the necessary time to do so.  The automated test facility that I built doesn't require any additional programming (beyond what I've already done); therefore, even business users and less experienced developers can create test data for use by the automated test system.<br>
<br>
2) Supports rapid regression testing while refactoring the existing .NET code base.<br>
<br>
3) Manual testing and analysis that often took days (sometimes weeks) can now be done in minutes.<br>
<br>
4) Troubleshooting regression failures has been greatly simplified.<br>
<br>
<br>
Thank you for producing a truly great piece of software!<br>
<br>
<br>
Peter Santoro<br>
______________________________<u></u>_________________<br>
pytest-dev mailing list<br>
<a href="mailto:pytest-dev@python.org" target="_blank">pytest-dev@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/pytest-dev" target="_blank">https://mail.python.org/<u></u>mailman/listinfo/pytest-dev</a><br>
</blockquote></div>