I wanted to know if there exists any formal testing framework for testing Word Add-ins. Microsoft internally would use one to test APIs like
insertContentControl, etc. I was wondering if there exists an open-source variant.
If it does not, I would like to propose and idea for the project and I am willing to work on it if it is accepted.
Goal: The project would allow users to write tests their Word-Addin functionalities.
A basic outline of the framework would function is as follows:
- For every test, an MS Word instance would be spawned (similar to what Selenium does but for a browser.). This instance could be just a document in MS Word and we don't need to display other features such as the toolbars and ribbons in MS Word. One may call it a "headless" MS Word.
- Next, we can call a function inside the test which contains APIs listed here. These APIs will interact with the spawned instance above. For each API call, the OOXML of the document will be altered and can be used to perform assertions.
- Finally, the test can
expect a certain OOXML change and we will have to create a functionality inside our testing framework which would look for that "certain OOXML" and pass the test if found.
However, for the first step, I would need to understand how feasible it is to spawn such an instance at my end because MS Word is not an open-source software so I don't know if I can implement that on my own. Regardless, if you find my project idea interesting, do let me know. I can create a more detailed proposal with code snippets which would further outline the user stories and functionalities.