Browser testing widgets

60 views
Skip to first unread message

Jens Teglhus Møller

unread,
Oct 5, 2012, 4:30:43 AM10/5/12
to google-we...@googlegroups.com
Hi

While developing a project I always create some project specific widgets, that is reused within the application (i.e. a dialog box).

Sometimes these widgets are only used deep within the application and testing them in the browser is tedious since you have to boot the entire application and navigate to the location where the widget is used.

What I have done so far is to hack the entry point class to just load the widget I'm currently working on, but I find that quite messy, especially on a shared project.

Is there a standard way to setup some browser tests (I'm not talking unit testing, I want to test the look and feel of the widget).

I have thought about a structure like this:

war/
  test/
    test_TestClass1.html
    test_TestClass2.html

and then have the entry point class determine which class I'm testing based on the filename. The test class should then instantiate the widget with some mock values.

(I will probably create a servlet or jsp page that goes through the classes in the test package and creates a list of links instead of creating individual html files)

Problem is I think I will need a Class.forName() to do that in an elegant way (I don't want a huge case statement in my entry point class).

Is a functionality like this already available and if not do you have any good ideas on how to implement this?

Best regards Jens
Reply all
Reply to author
Forward
0 new messages