On Wed, Dec 18, 2019 at 8:23 PM Илья Шипицин <[email protected]> wrote: >> redirects are easy to test. using any framework. > > for example, jmeter (or any other http query tool) > >> * apply authentication for `admin`; >> * force some caching headers for `web`, `static` and `media`; > > same here. assert in jmeter would serve caching headers check > >> * apply some "sanity" checks to requests / responses (i.e. except >> admin, the rest should only serve `GET` requests); >> * deny any request that doesn't match a set of domains > > same here. just fire random query using jmeter
JMeter, like Postman, don't seem very adequate tools for this purpose; for starters they are too centered around a UI (especially for "editing" the tests). (Although they have CLI runners, and perhaps their "tests collections" can be serialized in a file and put in a Git repository, I don't think one can easily use it with e.g. a custom editor, etc., like any "normal" configuration.) For example: * https://jmeter.apache.org/demos/ -- an XML file for JMeter JMX files used as "test plans"; * https://github.com/Blazemeter/taurus/blob/master/examples/functional/postman-sample-collection.json -- a JSON file (random example) for Postman; The closest I could find something that resembles "usability" is Tavern, which at least has the advantage of YAML as opposed to "raw" XML or JSON: * https://github.com/taverntesting/tavern * https://github.com/taverntesting/tavern/blob/master/example/simple/test_server.tavern.yaml Really I would have expected to find a lightweight and generic Python or Ruby "framework" that allows one to write such tests in a more "programmatic" manner... :( Ciprian.

