Testing ArrowHead
This How-To describes test ArrowHead
Overview
This How-To describes test ArrowHead
Prerequisites
- Everything described in the Installation How To and Compiling How To
- Installed and running PostgreSQL server - tested against 7.4.2. Available Here.
- PostgreSQL JDBC driver - tested against pg74.213.jdbc4.jar. Available Here.
Steps
Prepare the Database
- Install PostgreSQL, make sure it is listening for TCP/IP connections. Add the user "test" with the password "test". Create the database "asptest", and execute the following SQL commands as the "test" user in the database "asptest": CREATE TABLE test ( IntField INTEGER PRIMARY KEY, StringField VARCHAR(64) NOT NULL, NullableStringField VARCHAR(64), NullableIntField INTEGER ); INSERT INTO test (StringField, IntField) VALUES ('First Row', 1); INSERT INTO test (StringField, IntField) VALUES ('Second Row', 2); INSERT INTO test (StringField, IntField) VALUES ('Third Row', 3); INSERT INTO test (StringField, IntField) VALUES ('Fourth Row', 4); INSERT INTO test (StringField, IntField) VALUES ('Fifth Row', 5); INSERT INTO test (StringField, IntField) VALUES ('Sixth Row', 6); INSERT INTO test (StringField, IntField) VALUES ('Seventh Row', 7); INSERT INTO test (StringField, IntField) VALUES ('Eigth Row', 8); INSERT INTO test (StringField, IntField) VALUES ('Ninth Row', 9); INSERT INTO test (StringField, IntField) VALUES ('Tenth Row', 10); INSERT INTO test (StringField, IntField) VALUES ('Eleventh Row', 11); INSERT INTO test (StringField, IntField) VALUES ('Twelfth Row', 12); INSERT INTO test (StringField, IntField) VALUES ('Thirteenth Row', 13); INSERT INTO test (StringField, IntField) VALUES ('Fourteenth Row', 14); INSERT INTO test (StringField, IntField) VALUES ('Fifteenth Row', 15);
Prepare the Webapp
- After installing and preparing the database, prepare the webapp by executing: $ ant prep-test
Configure Tomcat
- Configure Tomcat to point the "asptest" context to the "test" subdirectory created by "ant prep-test". Here is an example section from server.xml to configure this: <Service name="Catalina"> <Connector port="8080"/> <Engine name="Catalina" defaultHost="localhost"> <Host name="localhost" appBase="webapps"> <Context path="/asptest" docBase="/the/location/of/arrowhead/test"/> </Host> </Engine> </Service>
- With this configuration, when you browse to: http://localhost:8080/asptest/misc/test-comments1.asp The following should be seen in the browser window: Here is a test of single quote comments. HiHi
Running the Acceptance Tests
- With everything in place, just run: $ ant test
- The testing report will be available in: report/html/junit-noframes.html
Testing against a Servlet Server on a different machine
- To test against a Servlet Server on a different machine, edit build.xml and change the line: <property name="asptest.server" value="localhost:8080"/> to reflect which server to test against.
by Terence Haddock

