Unit Testing of plugin code

Has anyone used JUnit for writing automated unit test cases in Appian plugin code? I am aware of remote-debugging where we can connect Eclipse to JBoss for debugging purpose. But, it would be better if we could use JUnit to write some testcases.

Let me know if anyone has done so.

OriginalPostID-250251

  Discussion posts and replies are publicly visible

Parents Reply
  • As a senior developer responsible for creating a plugin standard across all projects, I struggle with this.
    Some developers will use and pass Appian specific services into nearly every important or critical method in most classes.

    When asked to rebrand an altered plugin, it's practically impossible, within a reasonable amount of time, to decouple the Appian specific code and the actual workhorses of the plugin. This is generally due to downloaded plugins and plugins developed in-house due, specifically, to the lack of standards.

    Carlos is right, plugins are a two piece project. The plugin code itself, the pom, and you should be using Maven, would call a separate library to do the actual heavy lifting and the Plugin project is simply an integration wrapper.

    With ConfigurationLoader.initializeConfiguration being deprecated, we need a way to mock Appian services to support legacy or upgraded plugins without the need to spend an inordinate amount of time trying to split it apart.
Children
No Data