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
  • You can do that the same way you test any plug-in, all you need is:

    1. A local Appian installation
    2. Add <APPIAN_HOME>\\_admin\\_scripts\\classpath.jar to the build path
    3. When initializing the unit testing invoke

    ConfigurationLoader.initializeConfigurations();

    For example

    @Before
    public void setUp() throws Exception {
    ConfigurationLoader.initializeConfigurations();
    }

    then start from there.
Reply
  • You can do that the same way you test any plug-in, all you need is:

    1. A local Appian installation
    2. Add <APPIAN_HOME>\\_admin\\_scripts\\classpath.jar to the build path
    3. When initializing the unit testing invoke

    ConfigurationLoader.initializeConfigurations();

    For example

    @Before
    public void setUp() throws Exception {
    ConfigurationLoader.initializeConfigurations();
    }

    then start from there.
Children