404 private links
Enshittification of Postman (no offline mode), the performance crisis
I know hurl that can be useful. The author lists the ideal API tool:
- local-first
- file-system centric to be stored in the VCS
- zero login wall
- git native collaboration
- native performance
- extensible design
- universal imports (OpenAPI, GraphQL, ...)
- proxy agnostic. It must be designed to proxy traffic through any interception tool. Proxy-aware or browser-based architecture is must have.
- scripting & Auth flows. Pre-request & post-response hooks.
- Straightforward testing. Built-in support for writing and running tests against API responses by code.
For every Postman or Insomnia, there’s a Bruno, Hurl, or Httpie
Testing sucks because you try to test implementation details. This results in you writing tests to pass your code. That’s not useful, because…
Instead, you should…
- Write an empty test, with one comment for each external behavior your code should display.
- Write the code to test each comment below it.
- Then write the actual code to make it so.
Create a CA locally and use it to generate certificates. So it's perfect for local network requests (https, etc...)
Now that we know why tests exist, we can extrapolate when tests need to stop existing: any time they decrease confidence in a change.
You don’t need to update the old tests, you need to test the new behavior directly. Delete the tests.
Especially flaky tests
A lightweight browser of automation.
It integrates well with Puppeteer or Playwright.
TL;DR we don't care in unit tests about internal testing. That doesn’t mean shallow rendering is wrong.
I personally use them to test well separated logic and iterate over:
- write the test that make the feature pass
- implement until the code passes the test
- next feature or case or exception
- repeat.
Yes. TDD.
This repository contains the code for our paper: "Who's Breaking the Rules? Studying Conformance to the HTTP Specifications and its Security Impact" ACM ASIACCS 2024. It contains a test suite for HTTP conformance tests of responses and test runners to run it on both local web servers and on real websites.
About avoiding mock and writing tests that uses the database directly.
Hurl is a command line tool that runs HTTP requests defined in a simple plain text format.
It can asserts results too.
The project is used by the Orange ISP at https://github.com/Orange-OpenSource/hurl
In a nutshell, the purpose of REVENGE.CSS is to apply visual regressions to any markup anti-patterns. It makes bad HTML look bad.
Interesting.
Passing CSS variable errors can be useful too.
There are also useful patterns.
Simply run these scripts on the web page to trigger some actions.
- Validate HTML
- Calculate carbon
- WAVE
- PageSpeed
- SSL Report
- Security Headers
An example of API testing in Cypress
How to rotate items to test every day