"Test quietly but carry a big
net"
|
Morebot is a test tool which "spiders" a designated web site in order to test it automatically. Written in Java, Morebot is a thin layer on top of httpunit, and is especially suitable for testing web applications which have login via a web page. Morebot is free and open source.
Why |
Morebot was created as a means to quickly test the loading of pages in web applications which require authentication. These pages cannot be reached without a login, but can be reached by a "spider" that starts in the right place(s) and has successfully logged in.
After the login page, no web forms are followed. Pages that can only be reached by POSTing information to the server (e.g., the result page after submitting a form) are ignored by Morebot, unless you add custom code (see WebTest for a framework for posts).
Morebot can avoid certain pages, like logout links, and can recognize certain page elements as failure notifications, like a page which has the text "The function you requested did not complete". You specify your choices in a preference file for your site. Morebot uses this preference file, written in XML, to determine how and where to launch the spider. Like most spider tools, Morebot supports a list of "allowed hosts" which prevent the spider from escaping its intended boundaries to test the entire World Wide Web.
No Java coding is necessary for testing a web site in this way, i.e., testing whether the pages load properly and have no obvious failure notifications.
Morebot can be used as a load test by running many spiders simultaneously, and it has a configuration feature to limit the repetition of similar pages; in other words, you can configure it to know that after the first time to a certain type of URL, it should skip that kind of URL when it next sees it, which is useful for preventing it from spidering an entire database table of items if all you want is for it to go test one of the pages from that table.
Where |
The project page gives access to
How |
You'll need Java 1.5 or better to run Morebot.
After downloading, give it a try using either
depending on your operating system. This should work "out of the box" if you have an internet connection, and the default server is up and running. You should see output like
C:\temp\morebotrelease>java -jar morebot.jar .. Spidering: http://www.jcorporate.com/eforum/Browse.do ------------------------- Title: "Discussion Topics". Links found: 4; following: 4 . Title: "Forums". Links found: 0; following: 0. Reached from: "Discussion Topics" . Title: "New Group". Links found: 1; following: 0. Reached from: "Discussion Topics" . Title: "Subscribe To Forums". Links found: 1; following: 0. Reached from: "Discussion Topics" . Title: "Threaded Discussion". Links found: 34; following: 4. Reached from: "Discussion Topics" . Title: "Discussion Topics". Links found: 4; following: 0. Reached from:"Threaded Discussion" . Title: "New Topic". Links found: 1; following: 0. Reached from: "Threaded Discussion" . Title: "Messages". Links found: 7; following: 2. Reached from: "Threaded Discussion" . Title: "New Message". Links found: 1; following: 0. Reached from: "Messages" . Title: "Reply". Links found: 1; following: 0. Reached from: "Messages" STOPPING after 10 pages, the maximum number of tests allowed via preferences. Time: 11.256 OK (11 tests) C:\temp\morebotrelease>pause Press any key to continue . . .
This is the "verbose" output of a truncated test on jcorporate.com, the home of the Expresso framework. No failures were found in the 10 pages spidered. The initial test for login was successful, or the rest of the tests would not proceed.
Next, you should change the preferences to test your site. Edit the XML preferences file "morebot.xml" with your favorite text editor or XML editor. You should tell Morebot the start URL(s) for your site via the preference "start_URL". You can have multiple start_URLs. In the example below, the start_URL is enclosed in a CDATA tag because it has ampersands. Use the CDATA "wrapper" tag if your URLs have ampersands.
<preference key="start_URL"><![CDATA[http://www.jcorporate.com/econtent/Content.do?state=template&template=3&resource=636&db=default]]></preference>
Next, you should tell Morebot where to find your login page, via the preference "login_pageURL". In addition, provide a URL which will fail without authentication. In other words, a page that Morebot can test before a login, in order to make sure that access is refused and thereby redirected to a login page. This "restricted" page is indicated via the preference "login_restrictedURL". For example, here are the login page and a restricted page at the JCorporate web site:
<preference key="login_pageURL">http://www.jcorporate.com/Login.do?dbContext=default</preference>
<preference key="login_restrictedURL"><![CDATA[http://www.jcorporate.com/DBMaint.do?dbobj=com.jcorporate.expresso.services.dbobj.Setup&state=List]]></preference>
There are several other preferences that may be necessary for your site. See the description of each preference to determine whether it applies to your site.
What about... |
See frequently asked questions (FAQ) about Morebot.
Who |
Morebot was initially developed by Larry Hamel, and was inspired by Patti Schank and Rick Hightower. Morebot is only possible because of the libraries on which it is built, especially httpunit, junit, dom4j, and Ant.
hosted by | |
built on | ,     ,     |
developed by |