.net - Automated Testing OpenXML SDK -
I am implementing the MS Word document generation using Content Control and OpenXml SDK. I have to do some automated testing for that code (unit test or some easy UI automation test)
Has anyone used it with the test of MS Word document generation? What are the possible options?
Thanks in advance!
No, I have not tested the unit of the Haven MS Word document generation, but called Ingo Walls , This unit should not be isolated from any other form of testing.
1) [Optional - Use SDK for your needs] to make sure that you think right] How to drive your app to SDK. Write some test scripts that emulate the desired functionality and make sure they meet Word documents as you expect.
2) Create an interface (or interface) that contains such functionality that are required for your documents generation. Note: The interface does not need to provide full functionality of the OpenXML SDK - only the functionality you need for your applications.
3) Create a solid implementation of your interface, under which OpenXML SDK
4) Use the interface that you created to create a document.
5) Use NUINIT and NMCOC (or similar) to write unit tests that drive the generation layer. Your application These tests should use a cool interface rather than an example of concrete implementation. Now you can emphasize in your tests that your generation layer behaves according to your expectations.
Comments
Post a Comment