http://mockito.org/
Mockito is a mocking framework that tastes really good. It lets you write beautiful tests with clean & simple API. Mockito doesn't give you hangover because the tests are very readable and they produce clean verification errors.
Related cards:
httpbin: HTTP Client Testing Service
Some dozen generic API endpoints you can use to test how your HTTP client deals with various responses, e.g.
- a slow connection
- many redirects
- compressed data
I found this useful while debugging an issue with timeouts.
RestClient / Net::HTTP: How to communicate with self-signed or misconfigured HTTPS endpoints
Occasionally, you have to talk to APIs via HTTPS that use a custom certificate or a misconfigured certificate chain (like missing an intermediate certificate).
Using RestClient will then raise RestClient::SSLCertificateNotVerified
errors, or wh...
Thoughtbot's experiences with headless Javascript testing
Selenium has been the siren song that continually calls out to us. Unfortunately, in practice we’ve been unable to get Selenium to run reliably for real applications, on both developers machines and on the continuous integration server. This failu...
mynyml's holygrail at master - GitHub
The Holy Grail of testing for front-end development; execute browser-less, console-based, javascript + DOM code right from within your Rails test suite.
HTTPie nice command line HTTP client
HTTPie consists of a single http command designed for painless debugging and interaction with HTTP servers, RESTful APIs, and web services
It easy to use and has very nice defaults and coloured output which makes it good for local testing.
Usa...
PhantomJS: Headless WebKit with JavaScript API
PhantomJS is a minimalistic headless WebKit.
It has fast and native support for various web standards:
DOM handling, CSS selector, JSON, Canvas, and SVG.
PhantomJS can be fully scripted using JavaScript. It is an optimal solution for headle...
Speed up your websites: Put JavaScripts at bottom
For websites that don't do JavaScript rendering on the client, it's best practice to put script tags at the bottom of the HTML. This way, the page can start to render before scripts have been loaded and run.
The caveat is that you also have to mo...
JavaScript: Testing the type of a value
Checking if a JavaScript value is of a given type can be very confusing:
- There are two operators
typeof
andinstanceof
which work very differently. - JavaScript has some primitive types, like string literals, that are not objects (as oppose...
Testing HTTPS with badssl.com
Website that offers lots of different kinds of HTTPS configurations, bad or good or complicated.
They also offer a dashboard to check if your browser's HTTPS handling works as expected (which might be compromised ...