My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
KotoriWebJUnitRunner  
a junit runner for GAE production
en, ja
Updated May 12, 2010 by bufferi...@gmail.com

Announce!

Kotori Web JUnit Runner became another project independently of this project.
http://code.google.com/p/ktrwjr/

Here is the older version document.

What Is Kotori Web JUnit Runner?

Kotori Web JUnit Runner is a JUnit Runner GWT application

that helps to run test cases on GAE Production Server.

Demonstration

http://ktr-wjr-demo.latest.bufferings.appspot.com/

  • The shortened name is ktr-wjr.
  • It's created with GWT and jQueryUI Theme.
  • It supports both JUnit3 and JUnit4 test cases.
  • It's checked running on windows' IE7/IE8/FF3/Chrome3.
  • The license is Apache License 2.0

If you deploy ktr-wjr with your GAE/J application,

you can run test cases in your application on production server.

How It Works?

It's simple.

  1. When you open the ktr-wjr page, it searches the test cases on the server and shows them.
  2. You check test cases you want to run, then click "Run" button.
  3. They are run on the server and you receive results.

How Do I Use It?

Step1: download zip

ktr-wjr-0.1.2-alpha-v200911262342.zip

Step2: copy files to your war

Unzip and copy files in the war directory

to your application's war directory.

Step3: edit your web.xml

Add the following to your web.xml.

  <servlet>
    <servlet-name>KtrWjrServiceServlet</servlet-name>
    <servlet-class>bufferings.ktr.wjr.server.service.KtrWjrServiceServlet</servlet-class>
  </servlet>

  <servlet-mapping>
    <servlet-name>KtrWjrServiceServlet</servlet-name>
    <url-pattern>/ktrwjr/ktrwjr/ktrwjr.s3gwt</url-pattern>
  </servlet-mapping>

But if you use Slim3 GWT Servlet, you don't have to do this step.

(Slim3 is a full-stack MVC framework optimized for Google App Engine/Java.)

Step4: security constraint

It is better to lock down the ktr-wjr urls

so that only admin users can access to

Add the following to your web.xml.

  <security-constraint>
    <web-resource-collection>
      <url-pattern>/ktrwjr/*</url-pattern>
    </web-resource-collection>
    <auth-constraint>
      <role-name>admin</role-name>
    </auth-constraint>
  </security-constraint>

Step5: add gwt-servlet.jar

Add "gwt-servlet.jar" into your "war/WEB-INF/lib" if there's not.

The library is in App Engine SDK.

Step6: add junit.jar

Add "junit.jar" into your "war/WEB-INF/lib" if there's not.

That's all.

First, launch development server and access to "/ktrwjr/index.html".

After checking it goes well on dev-server, deploy to production server.

And enjoy ktr-wjr testing!

jQueryUI Theme

I used jQueryUI Theme for ktr-wjr design.

jQueryUI Theme

The distribution zip includes the "base" theme,

but you can use what you like.

  1. donwload a jQueryUI Theme you like
  2. put the theme in "war/ktrwjr/css"
  3. change the css file reference in "war/ktrwjr/index.html" to the new one

Notice

30 seconds limitation

ktr-wjr simply runs test cases,

so a test which takes more than 30 seconds will fail.

If you want to run such tests, following project may be useful.

I don't know about that well, it seems to use Task Queue.

appengineunit

Test Case Search Directory

ktr-wjr searches test cases in "war/WEB-INF/classes" directory.

Servlet Call

ktr-wjr calls servlet twice on load.

After that, it calls once for running one test case.

Excluding that, it does not call servlet.

Independent of App Engine

ktr-wjr can work on App Engine, but it's independent of App Engine's libraries.

ktr-wjr is GWT application.

Sources

ktr-wjrhttp://kotori.googlecode.com/svn/trunk/ktr-wjr/
ktr-wjr-demohttp://kotori.googlecode.com/svn/trunk/ktr-wjr-demo/

Questions and Feedbacks

If you have any questions,

please post them on http://groups.google.com/group/kotori-group

If you find bugs

please post them on http://code.google.com/p/kotori/issues/list

And I want to know how you feel about. Please let me know.

Release Notes

0.1.2-alpha(2009-11-26)

  • Changed the icon and the label of the 'clear result button'.
  • Fixed the bug that when the 'hide succeeded button' is on, the testcase which result is cleared does not appear.
  • Fixed the bug that clearing results makes testcases total count zero.
  • Fixed the bug that clearing results makes trace panel clear.

0.1.1-alpha(2009-11-26)

  • support junit3 jar
  • add "clear" button that clears test results
  • set result bar green without failures and errors

0.1.0-alpha(2009-11-09)

first alpha version release


Sign in to add a comment
Powered by Google Project Hosting