Company
Date Published
Author
Greg Sypolt
Word count
873
Language
English
Hacker News points
None

Summary

PhantomJS is a lightweight headless test runner that allows developers to access the browser's DOM API for command-line-based testing. It is suitable for local development, version control pre-commit hooks testing, and as part of continuous integration pipeline testing. PhantomJS will not replace Selenium functional testing, but it provides fast feedback for deployed web applications without spinning up a browser. A well-defined cloud testing strategy can reduce web application bugs in production by catching issues locally before deploying to staging and production environments. Configuration management tools like Chef, Vagrant, and VirtualBox make it easy to spin up a web application locally for testing changes before creating a pull request. Test Kitchen is an integration test harness tool that allows running code on virtualization technologies and various cloud providers, making testing easy for developers. A cloud testing strategy typically includes static code analysis, unit tests, server spec tests, and PhantomJS tests executed at each checkpoint in the development process.