Location: PHPKode > projects > Program E > src/tester.php

    Program E
	Copyright 2002, Paul Rydell
	This file is part of Program E.
	Program E is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    Program E is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Program E; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

 * AIML test application
 * Load up dev-testcases.aiml and run this file to see if it passes all the tests
 * @author Paul Rydell
 * @copyright 2002
 * @version 0.0.8
 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
 * @package Interpreter
 * @subpackage Responder

* Include the guts of the program.
include "respond.php";

// Read tests.txt into an array, each line a different element.
"teststar test passed",
"teststar Test passed one and Test passed two and Test passed three and Test passed four",
"testunderscore Test passed one and Test passed two and Test passed three and Test passed four",
"testsr sraisucceeded",
"teststarset test passed",
"testgender he",
"testperson i was",
"testperson2 with you");


// For each element in the array to a curl request to talk.php.
for ($x=0;$x<sizeof($tests);$x++){

	// Start the session or get the existing session.

	// Timer will let us know how long it took to get our response.

	// Here is where we get the reply.

	// Stop the timer.

	// Print the results.
	print "<B>RESPONSE: " . $botresponse->response . "<BR></b>";
	print "<BR><BR>execution time: " . ss_timing_current("single");
	print "<BR>";


print "<BR><BR>all execution time: " . ss_timing_current("alll");
print "<BR>";

Return current item: Program E