A quick way to run smoke tests against code submissions for the transparent proxy problem. The proxy under test needs to expose a /clear url that the tests can hit to clear the cache in between specs.
- git clone git@github.com:sturnquest/proxy-test.git
- cd proxy-test
- npm install
- mocha test/unit
Run acceptance tests hitting the target proxy server to verify scenarios. The acceptance test will start a server that records and verifies requests from the proxy. The server listens on port 8080 by default.
- configure the proxy server to point to http://localhost:8080
- configure the proxy server params to be: {duration: 2 seconds, max-size: 1024 bytes, max-elements, 4}
- configure test/acceptance/server_test.js to point to the proxy server e.g. var proxyBaseUrl = "http://localhost:3000";
- start the proxy server
- mocha test/acceptance
- configure the proxy server to point to http://localhost:8080
- configure the proxy server params to be: {duration: 2 seconds, max-size: 1024 bytes, max-elements, 4}
- node app/start.js
- start the proxy server
- open a browser and hit the proxy server