JamwikiWebtest

major questions to resolve

Hi Folks, what is the right purpose to test jamwiki? Either I design the tests to test an existing webtest-installation running elsewhere (configure-able in the properties), or I test the clean build running with the mvn jetty:run-exploded command. So the alternatives are:

  • Testing an existing - running jamwiki installation.
  • Testing a clean compiled and builded jamwiki running inside jetty on the local machine.

Right at this moment I tend to the second option: testing a jetty-provided instance of jamwiki. What do you thing? -- mbert 12-Aug-2008 01:59 PDT

status of the webtests

Right at the moment the webtests do not run on every environment - with different languages .... -> I'm working on it. For that I will use the jamwiki-war/src/main/ressources property-files and add some keys who are right now under the pages directory. I would suggest to use language specific strings only inside the properties-files. Now I duplicate some values e.g. "Special:Allpages ..." so I'm able to test the link on the "starting page".

Using Webtest for jamwiki

Steps to run the webtest on jamwiki.org for developers.

If you like see: http://opensource.basehaus.com/webtest/screencasts/creating-a-first-webtest-project.htm

Yours steps to run the webtests for jamwiki

  • First: download: http://webtest.canoo.com/webtest/build.zip into a directory like webtest-snapshot (somewhere near the jamwiki source dir).
  • Second: change/adjust the webtest.home property in the jamwiki/webtests/build.xml file to your webtest-snapshot directory.

I changed those. I added the executables to the lib/webtest directory so only checkout is neccessary. The only thing to do is:

  • copy ant-trax-1.7.0.jar from the lib/webtest/lib directory to your ANT_HOME/lib directory.
  • cd jamwiki-war and call mvn jetty:run-exploded.

Now: change to the webtest directory and call: ant and see what happens ;-) The webtests will start (during the tests the webtest monitor will show up) and at the end the browser of your choise will show the results of the webtest-run.

Tool to record a webtest by using firefox

If you have a test issue you might want to start with copying an existing Webtest and adjusting it.

For starters if you work with firefox you will use the

firefox-plugin: http://opensource.basehaus.com/webtest/screencasts/creating-a-first-webtest-project.htm it's a nice tool to start with webtests, but only for the beginning.

usecases to test:

administration-configuration

  • test the basic administration on a new jamwiki installation.

(may be to difficult for a start - it's not what I often do).

login-test

  • as a new (unregistered) user and check the failure
  • login as a regular (registered) user

user-registration

  • register a new user - successfully.
  • try to register a user and fail.
(Hi Ryan, what will happen - technically - if a new user is registered? - for my test I will have to undo it afterwards! - cleanup the data-base.)

create a test-page

  • create a test-page as the test-user
  • ... check some extras

logout-test

  • test the logout for a test-user

... what else?

  • Every suggestion is welcome (I will search for know bugs to create a test for them).
  • How do I erase the traces from the system - for a clean system bevor the next test-run. I do need to create the same test-user when I run the webtests a second time.

-- mbert 04-Jul-2008 11:37 PDT