Skip to content
Lucas3oo edited this page Aug 30, 2014 · 18 revisions

I am not using Maven, can I still use JICUnit?

Yes, of course. Just make sure that jicunit-framework.jar, junit.jar, hamcrest-core.jar and primefaces.jar get included in the WAR.

In order to use the Web GUI runner there must be a file in the web app called test-suites.txt that list all the test classes that should be displayed in the GUI. E.g

com.example.jicunit.sample.SomeBusinessBeanTest
com.example.jicunit.sample.MinimalSampleTest

To run the test from the local env just use any JUnit runner and set the system property
-Djicunit.url to be the URL where the test WAR is deployed, e.g.
-Djicunit.url=http://localhost/my-test-war/tests

I do not use Eclipse,can I still run the test from my IDE?

Yes, of course. Just make sure to add the the system property -Djicunit.url when you launch the test runner in the IDE.

My JEE server does not properly support web fragments, what shall I do?

It should be possible to simply copy/past the settings in the web-fragment.xml in jicunit-framework.jar into the web.xml of the test WAR.

How do I enable Chuck Norris the programmer facts in the web runner GUI?

Add this to the web.xml:

  <context-param>
    <description>Enable Chuck Norris the programmer</description>
    <param-name>org.jicunit.framework.theme</param-name>
    <param-value>chucknorris</param-value>
  </context-param>

How can I separate Unit (Module) test from Integration tests?

One easy way is to create a marker interface for integration tests that you mark all integration tests with using the JUnit4 @Category annotation. See this page: http://www.agile-engineering.net/2012/04/unit-and-integration-tests-with-maven.html for in-depth setup using Maven.