An easier web testing framework
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.settings
demos
scripts
src
.classpath
.gitignore
.project
LICENSE.txt
README.adoc
TODO.txt
pom.xml
tests.txt

README.adoc

PageUnit

Why should you have to write twelve lines of XML to load a web page and check its content? PageUnit’s mission is to provide a very easy-to-use web page functional testing mechanism, using a "little language" tailored for this purpose.

While it was developed in Java, it can be used to test web pages in any language. A easier web testing framework, written in Java, based on JUnit style of testing and very simple input language.

See http://pageunit.darwinsys.com/docs/ for information on how to use.

To build and package for command-line use:

  1. mvn package assembly:single

  2. copy the uber-jar target/pageunit-1.0.2-SNAPSHOT-jar-with-dependencies.jar to someplace on your path, e.g., cp target/pageunit-1.0.2-SNAPSHOT-jar-with-dependencies.jar ~/lib

  3. Run it as java -jar ~/lib/pageunit-1.0.2-SNAPSHOT-jar-with-dependencies.jar fileName […​] (the script in scripts does this).

Of course the version number will change over time; use th' latest.

TODO

Improve documentation.

Add a 'Head' command (maybe I for "IsItThere?") to send HEAD instead of GET.

Options: set timeout time. (maybe U for "timeoUt and other options"

On ERROR, skip tests until B or H.

Create a JUnit4 Test Runner class that uses ScriptTestRunner (or its guts), so can say:

@RunWith(PageUnit.class)
public class TestWeb {
	// no parameters, it finds all *.txt files in "."
	// Optional
	@PageUnitFiles
	public List<String> files() {...}
	@PageUnitDir
	public String dir() {...}
}

Simplify code: all those trivial HTML things don’t need to be Interface+Impl. etc