How do you test a plug-in to an application?

When developing a plug-in to an application using an application API that doesn't run regardless of the application, is unit testing even a possibility? What are the strategies for testing a plug-in that is tightly integrated with the application?

+1


source to share


2 answers


Most people overlook the layout of the items. They are not about testing, but about discovering the interface. Or, as Michael Perot puts it differently in a recent release: API Wrapper .

Don't point directly against the api. Instead, create your own interfaces that abstract this api and then write tests for your code.



I did this while writing plugins for Eclipse and the results were much better than I expected ahead of time.

+1


source


Ditch the host API with frontends and test against mock node.

The key is that your logic is validated against the characteristic data that the host can provide.



If you have some sample code, I can probably give you a better answer.

+2


source







All Articles