Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Great tool and documentation <3

Started investigating how it can be integrated into GitLab CI/CD in the most efficient way.

Simple - install Hurl using before_script every time into the used container image. Example in https://gitlab.com/everyonecancontribute/dev/hurl-playground...

Efficient - build a custom container image (the upstream container image behaves unexpected when overriding the entrypoint for CI/CD, need to investigate and create an issue) Example in https://gitlab.com/everyonecancontribute/dev/hurl-playground...

A quick example to check the website body can be achieved with

  $ vim dnsmichi.at.hurl 

  GET https://dnsmichi.at

  HTTP/1.1 200

  [Asserts]
  body contains "Everything is a DNS problem"

  $ hurl --test dnsmichi.at.hurl 

While reading the documentation and all its great ways to use assertions on response https://hurl.dev/docs/asserting-response.html and play with regex, and even built-in JSON parsing, I thought of querying the Algolia search API for HN:

  $ vim hackernews.hurl 

  GET https://hn.algolia.com/api/v1/search
  [QueryStringParams]
  query: gitlab
  tags: front_page

  HTTP/2 200

  [Asserts]
  jsonpath "$.hits" count > 0

  $ hurl --test hackernews.hurl 
Not perfect yet, but shows the possibilities and maybe kicks off more ideas.

Will add more use cases, upstream PRs, and a blog post soon. https://gitlab.com/everyonecancontribute/dev/hurl-playground



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: