automated tests - Testing File Creation Wrapper C#.Net - Thoughts -


This is probably a Nobew question that I will get a slot for it but here goes ... sorry for the length Trying to keep it will probably be less.

Background

I am working on triggering a code base, which I inherited in my new role. So I'm starting the test because I work on section / bug / new features. One of these features is an invoice printing function, which generates an invoice from the crystal report RPT file. There was already a small cover for the built-in crystal functions, I want to check it and make sure that we produce the files as necessary.

Problems First of all, I know that anything that uses file io should not be part of the test, but do I have to cover it with integrity testing / system tests Can i do Do I run the cover with preloaded data and check that a file goes out? Can I inquire from PDF inquiries and make sure the details are correct?

I have tried to break some IOs so that I can test the cover of the unit, but here I had a Cropical Report Document class apart from this I really needed to change the class structure to change, Actually I should do it (I feel as if I want it), but to make private privately I can insert test data a little bit.

I have not posted the code because this is a theoretical debate over the minute ... I would love to get some code coverage, but not sure if I am thinking that someone should tell me about this type of Can advise in situations.

Many thanks at any time.

I will not worry about the unit test class, because its nature by integration class. The implementation should be quite simple (methods of the stars for underlying crystal report objects, etc.), so I would not want to bother about a dedicated integration test for this single class. It should still be covered with acceptance / high level integration tests. I'm not sure how the crystal report works, but ideally you want to compare PDFs in a binary way with a known good edition (this will only work if the generated files are always the same).


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -