readme: move testing to a wiki page
This commit is contained in:
@@ -134,101 +134,6 @@ For more configuration details, see the [differences from mod_pagespeed
|
||||
configuration](https://github.com/pagespeed/ngx_pagespeed/wiki/Configuration-differences-from-mod_pagespeed)
|
||||
wiki page.
|
||||
|
||||
## Testing
|
||||
|
||||
The generic Pagespeed system test is ported, and all but three tests pass. To
|
||||
run it you need to first build nginx. You also need to check out mod_pagespeed,
|
||||
but we can take a shortcut and do this the easy way, without gyp, because we
|
||||
don't need any dependencies:
|
||||
|
||||
```bash
|
||||
$ svn checkout https://modpagespeed.googlecode.com/svn/tags/1.5.27.1/ mod_pagespeed
|
||||
```
|
||||
|
||||
Then run:
|
||||
|
||||
```bash
|
||||
test/run_tests.sh \
|
||||
primary_port \
|
||||
secondary_port \
|
||||
mod_pagespeed_dir \
|
||||
nginx_executable_path
|
||||
```
|
||||
|
||||
For example:
|
||||
|
||||
```bash
|
||||
$ test/run_tests.sh 8050 8051 /path/to/mod_pagespeed \
|
||||
/path/to/sbin/nginx
|
||||
```
|
||||
|
||||
All of these paths need to be absolute.
|
||||
|
||||
This should print out a lot of lines like:
|
||||
|
||||
TEST: Make sure 404s aren't rewritten
|
||||
check_not fgrep /mod_pagespeed_beacon /dev/fd/63
|
||||
|
||||
and then eventually:
|
||||
|
||||
Failing Tests:
|
||||
In-place resource optimization
|
||||
In-place resource optimization
|
||||
In-place resource optimization
|
||||
compression is enabled for rewritten JS.
|
||||
convert_meta_tags
|
||||
compression is enabled for rewritten JS.
|
||||
FAIL.
|
||||
With serf fetcher setup.
|
||||
|
||||
Each of these failed tests is a known issue:
|
||||
- [In-place resource
|
||||
optimization](https://github.com/pagespeed/ngx_pagespeed/issues/42)
|
||||
- [compression is enabled for rewritten JS.](
|
||||
https://github.com/pagespeed/ngx_pagespeed/issues/70)
|
||||
- If you're running a version of nginx without etag support (pre-1.3.3) you
|
||||
won't see this issue, which is fine.
|
||||
- [convert_meta_tags](https://github.com/pagespeed/ngx_pagespeed/issues/56)
|
||||
|
||||
If it fails with:
|
||||
|
||||
TEST: PHP is enabled.
|
||||
...
|
||||
in 'PHP is enabled.'
|
||||
FAIL.
|
||||
|
||||
the problem is that the test expects a php server to be running on port 9000:
|
||||
|
||||
```bash
|
||||
$ sudo apt-get install php5-cgi
|
||||
$ php-cgi -b 127.0.0.1:9000 &
|
||||
```
|
||||
|
||||
If it fails with some other error, that's a problem, and it would be helpful for
|
||||
you to [submit a bug](https://github.com/pagespeed/ngx_pagespeed/issues/new).
|
||||
|
||||
Log files are in `test/tmp/error.log` and `test/tmp/access.log`.
|
||||
|
||||
### Testing with memcached
|
||||
|
||||
Start an memcached server:
|
||||
|
||||
```bash
|
||||
$ memcached -p 11211
|
||||
```
|
||||
|
||||
In `ngx_pagespeed/test/pagespeed_test.conf.template` uncomment:
|
||||
|
||||
pagespeed MemcachedServers "localhost:11211";
|
||||
pagespeed MemcachedThreads 1;
|
||||
|
||||
Then run the system test as above.
|
||||
|
||||
### Testing with valgrind
|
||||
|
||||
If you set the environment variable `USE_VALGRIND=true` then the tests will run
|
||||
with valgrind:
|
||||
|
||||
```bash
|
||||
USE_VALGRIND=true test/nginx_system_test.sh ...
|
||||
```
|
||||
There are extensive system tests which cover most of ngx_pagespeed's
|
||||
functionality. Consider [testing your
|
||||
installation](https://github.com/pagespeed/ngx_pagespeed/wiki/Testing).
|
||||
Reference in New Issue
Block a user