Egg::Helper::Project::Test - The operation test of Project Application is done.
# Test of GET request. perl MyApp/bin/myapp_tester.pl / # Test of POST request. perl MyApp/bin/myapp_tester.pl / -m post # The parameter is passed by the POST request. # * ./test-param.yaml is prepared beforehand. perl MyApp/bin/myapp_tester.pl / -m post -p ./test-param.yaml # The response contents are output. perl MyApp/bin/myapp_tester.pl / -r 1
It is a helper module that tests the project application under making.
A virtual request is started when suitable URI is passed from the command line of the console and doing project CGI is started.
Output debugging and error message are confirmed.
The source of output contents can be confirmed by specifying the option.
The script to start is bin/project_name_tester.pl output when the project is generated. equest URI and the option are passed and tested to this script.
The following options are accepted.
It is a request method. GET is requested at the unspecification.
The output contents are output to STDOUT.
To include the parameter at the POST request, the parameter file that wants to be passed by the YAML form is made, and the PATH is passed to this option.
param1: test_ok1 param2: test_ok2
If it wants to do the upload test, it should be defined that it becomes a form passed to HTTP::Request::Common that contains 'Content_Type' item.
Content_Type: form-data Content: - param1 - test_ok1 - param2 - test_ok2 - upload1 - /path/to/upload.txt - upload2 - /path/to/upload.html
Masatoshi Mizuno <email@example.com>
Copyright (C) 2007 by Bee Flag, Corp. <http://egg.bomcity.com/>, All Rights Reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.