From 1ae178334023d36a224b06c371a47a5c3e0aad3d Mon Sep 17 00:00:00 2001 From: wei <> Date: Mon, 14 May 2007 02:51:03 +0000 Subject: remove unfinished docs. --- .../pages/Docs/WritingFunctionalTest.page | 39 ---------------------- 1 file changed, 39 deletions(-) delete mode 100644 demos/time-tracker/protected/pages/Docs/WritingFunctionalTest.page (limited to 'demos/time-tracker/protected/pages/Docs/WritingFunctionalTest.page') diff --git a/demos/time-tracker/protected/pages/Docs/WritingFunctionalTest.page b/demos/time-tracker/protected/pages/Docs/WritingFunctionalTest.page deleted file mode 100644 index b4da0952..00000000 --- a/demos/time-tracker/protected/pages/Docs/WritingFunctionalTest.page +++ /dev/null @@ -1,39 +0,0 @@ - -

Writing a Functional Web Test

-

In addition to unit testing, we shall also do some functional -testing or web testing. Functional tests are, in this case, basically automated tests that will -interact with the overall web application, as if it was the user, while checking the output for correctness. -The functional test tool we shall use here is based on Selenium where the test cases can be written and run using PHP and SimpleTest. -

- -<?php -class HelloPradoTestCase extends SeleniumTestCase -{ - function test() - { - $this->open('../index.php'); - $this->assertTextPresent('Welcome to Prado!'); - } -} -?> - -

Save the code as HelloPradoTestCase.php in the document_root/time-tracker/tests/functional/ -directory.

- -

-Functional test cases are written very similar to unit test cases. The method such as -open($url) are those found in Selenium. All the methods available in Selenium are available. -

- -

Run your first unit test case from your browser

-

Point your browser to your development server's unit test case runner, e.g. - http://web-server-address/time-tracker/tests/functional.php. You should see the following - -

Figure 4: Functional test runner
-

-

Clicking on the All button, you should see - -

Figure 5: Functional test success
-

- -
\ No newline at end of file -- cgit v1.2.3