<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Owl Duty</title>
    <description>The latest articles on DEV Community by Owl Duty (@owlduty).</description>
    <link>https://dev.to/owlduty</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Forganization%2Fprofile_image%2F6576%2Fc71830f3-d312-4cf5-81bc-1bd80a9eb424.jpg</url>
      <title>DEV Community: Owl Duty</title>
      <link>https://dev.to/owlduty</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/owlduty"/>
    <language>en</language>
    <item>
      <title>Use Grillon to test your Rust HTTP API! 0.5.0-alpha.1 is out!</title>
      <dc:creator>theredfish</dc:creator>
      <pubDate>Tue, 05 Sep 2023 23:35:00 +0000</pubDate>
      <link>https://dev.to/owlduty/use-grillon-to-test-your-rust-http-api-050-alpha1-is-out-1p15</link>
      <guid>https://dev.to/owlduty/use-grillon-to-test-your-rust-http-api-050-alpha1-is-out-1p15</guid>
      <description>&lt;p&gt;Hey Rustaceans!&lt;/p&gt;

&lt;p&gt;Many of you develop or maintain HTTP APIs in Rust. But writing and maintaining their tests can be a tedious task right?&lt;/p&gt;

&lt;p&gt;With the pre-release 0.5.0-alpha.1, you can preview the built-in functions to test json path values for equality and validity with a json schema. Your feedback is important so we can better shape what you need! Give it a try by following the instructions in the Readme.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;⭐ Consider to give it a star to support the project! Thanks!&lt;/p&gt;
&lt;/blockquote&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--A9-wwsHG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/theredfish" rel="noopener noreferrer"&gt;
        theredfish
      &lt;/a&gt; / &lt;a href="https://github.com/theredfish/grillon" rel="noopener noreferrer"&gt;
        grillon
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      🦗 Grillon, an elegant and natural way to approach API testing in Rust.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Grillon&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a href="https://crates.io/crates/grillon" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/e82afbee1e3e56707a347d5d6eee453b96d9d466c61d05ed259d5f02fcc8cb93/68747470733a2f2f696d672e736869656c64732e696f2f6372617465732f762f6772696c6c6f6e" alt="Crates.io"&gt;&lt;/a&gt;
&lt;a href="https://docs.rs/grillon/latest/grillon" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/6673b82b6c635668f2480dc2d5c001394ca063c39656989954495c745a230d35/68747470733a2f2f696d672e736869656c64732e696f2f646f637372732f6772696c6c6f6e" alt="docs.rs"&gt;&lt;/a&gt;
&lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/372fca8795ec84cbf4730ec153af2b6565a64f4b3051ea999142a9b24b42120b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f746865726564666973682f6772696c6c6f6e2f63692e796d6c"&gt;&lt;img src="https://camo.githubusercontent.com/372fca8795ec84cbf4730ec153af2b6565a64f4b3051ea999142a9b24b42120b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f746865726564666973682f6772696c6c6f6e2f63692e796d6c" alt="GitHub Workflow Status"&gt;&lt;/a&gt;
&lt;a href="https://github.com/theredfish/grillon/actions/workflows/links.yml" rel="noopener noreferrer"&gt;&lt;img src="https://github.com/theredfish/grillon/actions/workflows/links.yml/badge.svg" alt="Check Links"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Grillon offers an elegant and natural way to approach API testing in Rust.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Elegant, intuitive and expressive API&lt;/li&gt;
&lt;li&gt;Built-in testing functions&lt;/li&gt;
&lt;li&gt;Extensible&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;Please note that the API is subject to a lot of changes until the &lt;code&gt;v1.0.0&lt;/code&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Documentation&lt;/h2&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;Book (&lt;a href="https://theredfish.github.io/grillon/current" rel="nofollow noopener noreferrer"&gt;current&lt;/a&gt; | &lt;a href="https://theredfish.github.io/grillon/dev" rel="nofollow noopener noreferrer"&gt;dev&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.rs/grillon/latest/grillon" rel="nofollow noopener noreferrer"&gt;API doc&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/theredfish/grillon/blob/main/CHANGELOG.md" rel="noopener noreferrer"&gt;Changelog&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Getting started&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;You need &lt;a href="https://tokio.rs/" rel="nofollow noopener noreferrer"&gt;Tokio&lt;/a&gt; as asynchronous runtime. Generally, testing libs are
used in unit or integration tests so let's declare &lt;code&gt;grillon&lt;/code&gt; as a dev-dependency.&lt;/p&gt;
&lt;p&gt;Add &lt;code&gt;grillon&lt;/code&gt; to &lt;code&gt;Cargo.toml&lt;/code&gt;&lt;/p&gt;
&lt;div class="highlight highlight-source-toml notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;[&lt;span class="pl-en"&gt;dev-dependencies&lt;/span&gt;]
&lt;span class="pl-smi"&gt;grillon&lt;/span&gt; = &lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;0.5.0-alpha.1&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt;
&lt;span class="pl-smi"&gt;tokio&lt;/span&gt; = { &lt;span class="pl-smi"&gt;version&lt;/span&gt; = &lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;1&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt;, &lt;span class="pl-smi"&gt;features&lt;/span&gt; = [&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;macros&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt;] }&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;Then use &lt;code&gt;grillon&lt;/code&gt; :&lt;/p&gt;
&lt;div class="highlight highlight-source-rust notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;&lt;span class="pl-k"&gt;use&lt;/span&gt; grillon&lt;span class="pl-kos"&gt;::&lt;/span&gt;&lt;span class="pl-kos"&gt;{&lt;/span&gt;dsl&lt;span class="pl-kos"&gt;::&lt;/span&gt;&lt;span class="pl-c1"&gt;*&lt;/span&gt;&lt;span class="pl-kos"&gt;,&lt;/span&gt; dsl&lt;span class="pl-kos"&gt;::&lt;/span&gt;http&lt;span class="pl-kos"&gt;::&lt;/span&gt;&lt;span class="pl-c1"&gt;*&lt;/span&gt;&lt;span class="pl-kos"&gt;,&lt;/span&gt; json&lt;span class="pl-kos"&gt;,&lt;/span&gt; &lt;span class="pl-v"&gt;Grillon&lt;/span&gt;&lt;span class="pl-kos"&gt;,&lt;/span&gt; &lt;span class="pl-v"&gt;StatusCode&lt;/span&gt;&lt;span class="pl-kos"&gt;,&lt;/span&gt; &lt;span class="pl-v"&gt;Result&lt;/span&gt;&lt;span class="pl-kos"&gt;}&lt;/span&gt;&lt;span class="pl-kos"&gt;;&lt;/span&gt;
&lt;span class="pl-k"&gt;use&lt;/span&gt; grillon&lt;span class="pl-kos"&gt;::&lt;/span&gt;header&lt;span class="pl-kos"&gt;::&lt;/span&gt;&lt;span class="pl-kos"&gt;{&lt;/span&gt;&lt;span class="pl-v"&gt;HeaderValue&lt;/span&gt;&lt;span class="pl-kos"&gt;,&lt;/span&gt; &lt;span class="pl-v"&gt;CONTENT_LENGTH&lt;/span&gt;&lt;span class="pl-kos"&gt;,&lt;/span&gt; &lt;span class="pl-v"&gt;CONTENT_TYPE&lt;/span&gt;&lt;span class="pl-kos"&gt;}&lt;/span&gt;&lt;span class="pl-kos"&gt;;&lt;/span&gt;
&lt;span class="pl-c1"&gt;#&lt;span class="pl-kos"&gt;[&lt;/span&gt;tokio&lt;span class="pl-kos"&gt;::&lt;/span&gt;test&lt;span class="pl-kos"&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class="pl-k"&gt;async&lt;/span&gt;&lt;/pre&gt;…
&lt;/div&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/theredfish/grillon" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


</description>
      <category>rust</category>
      <category>testing</category>
      <category>http</category>
      <category>library</category>
    </item>
    <item>
      <title>Rust Testing Material</title>
      <dc:creator>theredfish</dc:creator>
      <pubDate>Fri, 23 Jun 2023 14:34:01 +0000</pubDate>
      <link>https://dev.to/owlduty/rust-testing-material-2k7l</link>
      <guid>https://dev.to/owlduty/rust-testing-material-2k7l</guid>
      <description>&lt;p&gt;Hey Rustaceans,&lt;/p&gt;

&lt;p&gt;We recently published a new repository. A curated list of testing material in the Rust ecosystem. If you know good testing resources for Rust, please feel free to contribute! If you're interested you can also support the initiative by giving us a star!&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--A9-wwsHG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/owlduty"&gt;
        owlduty
      &lt;/a&gt; / &lt;a href="https://github.com/owlduty/rust-testing-material"&gt;
        rust-testing-material
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      🦀A curated list of test material in the Rust ecosystem.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div&gt;
    &lt;a rel="noopener noreferrer" href="https://github.com/owlduty/rust-testing-material/blob/main/logo/rtm-logo-light-theme.png#gh-light-mode-only"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--RIgoxnDN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://github.com/owlduty/rust-testing-material/raw/main/logo/rtm-logo-light-theme.png%23gh-light-mode-only" width="50%"&gt;&lt;/a&gt;
    &lt;a rel="noopener noreferrer" href="https://github.com/owlduty/rust-testing-material/blob/main/logo/rtm-logo-dark-theme.png#gh-dark-mode-only"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Ha23KbGp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://github.com/owlduty/rust-testing-material/raw/main/logo/rtm-logo-dark-theme.png%23gh-dark-mode-only" width="50%"&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a href="https://github.com/owlduty/rust-testing-material/actions/workflows/links.yml"&gt;&lt;img src="https://github.com/owlduty/rust-testing-material/actions/workflows/links.yml/badge.svg" alt="Check Links"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This repository contains a curated list of testing material in the Rust ecosystem. Feel free to
&lt;a href="https://github.com/owlduty/rust-testing-material./CONTRIBUTING.md"&gt;contribute and add your own material&lt;/a&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Rust testing material means any resource in a tangible or electronic format that can be used to
work or learn about testing in the Rust ecosystem. It can be distributed through any type of
medium such as blogs, talks, repos, books, videos, or audios.&lt;/p&gt;
&lt;p&gt;Inspired by &lt;a href="https://github.com/mre"&gt;@mre&lt;/a&gt;'s
&lt;a href="https://github.com/mre/idiomatic-rust"&gt;Idiomatic Rust&lt;/a&gt; repository.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;
Projects&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/cucumber-rs/cucumber"&gt;Cucumber&lt;/a&gt; - An implementation of the Cucumber testing framework for Rust.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/lipanski/mockito"&gt;Mockito&lt;/a&gt; - A library for generating and delivering HTTP mocks in Rust.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/nextest-rs/nextest"&gt;Nextest&lt;/a&gt; - The next-generation test runner for Rust.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/proptest-rs/proptest"&gt;Proptest&lt;/a&gt; - A property testing framework (i.e., the QuickCheck family).&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/frondeus/test-case"&gt;Test Case&lt;/a&gt; - Provides procedural macro attribute that generates parametrized test instances.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/stevepryde/thirtyfour"&gt;Thirtyfour&lt;/a&gt; -  A Selenium / WebDriver library for Rust, for automated website UI testing.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
Articles&lt;/h2&gt;
&lt;h3&gt;
2021&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.lpalmieri.com/posts/an-introduction-to-property-based-testing-in-rust" rel="nofollow"&gt;An Introduction To Property-Based Testing In&lt;/a&gt;…&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/owlduty/rust-testing-material"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


</description>
      <category>rust</category>
      <category>testing</category>
      <category>learning</category>
    </item>
    <item>
      <title>SaaS update: Assertions</title>
      <dc:creator>theredfish</dc:creator>
      <pubDate>Mon, 05 Jun 2023 10:10:25 +0000</pubDate>
      <link>https://dev.to/owlduty/saas-update-assertions-4dde</link>
      <guid>https://dev.to/owlduty/saas-update-assertions-4dde</guid>
      <description>&lt;p&gt;Development continues! An important feature for developers and testers is to easily write assertions. Our interface helps them discover what can be tested and chains the assertions with a No-Code interface.&lt;/p&gt;

&lt;p&gt;We have three major advantages:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Easy for non-techies to follow what is tested&lt;/li&gt;
&lt;li&gt;No-code: You don't to maintain a framework, codebase, or infrastructure. Focus only on the quality of your APIs.&lt;/li&gt;
&lt;li&gt;Discoverability: A simple list of options helps you check what can be tested.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The library used to run the tests is open source. It's written in Rust and available on the github repository &lt;a href="https://github.com/owlduty/grillon"&gt;owlduty/grillon&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Interested in what we build? We have a great landing page for you 😄 &lt;a href="https://owlduty.com"&gt;https://owlduty.com&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Cheers,&lt;/p&gt;

&lt;p&gt;./owlduty&lt;/p&gt;

</description>
      <category>saas</category>
      <category>ux</category>
      <category>testing</category>
      <category>opensource</category>
    </item>
    <item>
      <title>🦗Grillon: an expressive Rust library to test your HTTP APIs</title>
      <dc:creator>theredfish</dc:creator>
      <pubDate>Tue, 31 Jan 2023 08:00:00 +0000</pubDate>
      <link>https://dev.to/owlduty/grillon-the-expressive-rust-library-to-test-your-http-apis-52om</link>
      <guid>https://dev.to/owlduty/grillon-the-expressive-rust-library-to-test-your-http-apis-52om</guid>
      <description>&lt;p&gt;Hey there,&lt;/p&gt;

&lt;p&gt;I just released Grillon &lt;a href="https://github.com/theredfish/grillon/releases/tag/v0.4.0" rel="noopener noreferrer"&gt;v0.4.0&lt;/a&gt; and I thought it was a good opportunity to write my first dev.to post.&lt;/p&gt;

&lt;h2&gt;
  
  
  About Grillon
&lt;/h2&gt;

&lt;p&gt;Grillon is a Rust testing library that helps you write API tests in an expressive and natural way. It currently supports HTTP and I plan to extend it to other protocols/frameworks such as gRPC, WebSockets, SSL (certificates), TCP, UDP, ICMP.&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fassets.dev.to%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/theredfish" rel="noopener noreferrer"&gt;
        theredfish
      &lt;/a&gt; / &lt;a href="https://github.com/theredfish/grillon" rel="noopener noreferrer"&gt;
        grillon
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      🦗 Grillon, an elegant and natural way to approach API testing in Rust.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Grillon&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a href="https://crates.io/crates/grillon" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/e82afbee1e3e56707a347d5d6eee453b96d9d466c61d05ed259d5f02fcc8cb93/68747470733a2f2f696d672e736869656c64732e696f2f6372617465732f762f6772696c6c6f6e" alt="Crates.io"&gt;&lt;/a&gt;
&lt;a href="https://docs.rs/grillon/latest/grillon" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/6673b82b6c635668f2480dc2d5c001394ca063c39656989954495c745a230d35/68747470733a2f2f696d672e736869656c64732e696f2f646f637372732f6772696c6c6f6e" alt="docs.rs"&gt;&lt;/a&gt;
&lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/372fca8795ec84cbf4730ec153af2b6565a64f4b3051ea999142a9b24b42120b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f746865726564666973682f6772696c6c6f6e2f63692e796d6c"&gt;&lt;img src="https://camo.githubusercontent.com/372fca8795ec84cbf4730ec153af2b6565a64f4b3051ea999142a9b24b42120b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f746865726564666973682f6772696c6c6f6e2f63692e796d6c" alt="GitHub Workflow Status"&gt;&lt;/a&gt;
&lt;a href="https://github.com/theredfish/grillon/actions/workflows/links.yml" rel="noopener noreferrer"&gt;&lt;img src="https://github.com/theredfish/grillon/actions/workflows/links.yml/badge.svg" alt="Check Links"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Grillon offers an elegant and natural way to approach API testing in Rust.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Elegant, intuitive and expressive API&lt;/li&gt;
&lt;li&gt;Built-in testing functions&lt;/li&gt;
&lt;li&gt;Extensible&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;Please note that the API is subject to a lot of changes until the &lt;code&gt;v1.0.0&lt;/code&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Documentation&lt;/h2&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;Book (&lt;a href="https://theredfish.github.io/grillon/current" rel="nofollow noopener noreferrer"&gt;current&lt;/a&gt; | &lt;a href="https://theredfish.github.io/grillon/dev" rel="nofollow noopener noreferrer"&gt;dev&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.rs/grillon/latest/grillon" rel="nofollow noopener noreferrer"&gt;API doc&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/theredfish/grillon/blob/main/CHANGELOG.md" rel="noopener noreferrer"&gt;Changelog&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Getting started&lt;/h2&gt;
&lt;/div&gt;
&lt;blockquote&gt;
&lt;p&gt;Before you begin, be sure to read the book to learn more about configuring logs and assertions!&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;You need &lt;a href="https://tokio.rs/" rel="nofollow noopener noreferrer"&gt;Tokio&lt;/a&gt; as asynchronous runtime. Generally, testing libs are
used in unit or integration tests so let's declare &lt;code&gt;grillon&lt;/code&gt; as a dev-dependency.&lt;/p&gt;
&lt;p&gt;Add &lt;code&gt;grillon&lt;/code&gt; to &lt;code&gt;Cargo.toml&lt;/code&gt;&lt;/p&gt;
&lt;div class="highlight highlight-source-toml notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;[&lt;span class="pl-en"&gt;dev-dependencies&lt;/span&gt;]
&lt;span class="pl-smi"&gt;grillon&lt;/span&gt; = &lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;0.6.0&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt;
&lt;span class="pl-smi"&gt;tokio&lt;/span&gt; = { &lt;span class="pl-smi"&gt;version&lt;/span&gt; = &lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;1&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt;, &lt;span class="pl-smi"&gt;features&lt;/span&gt; = [&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;macros&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt;] }&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;Then use &lt;code&gt;grillon&lt;/code&gt; :&lt;/p&gt;
&lt;div class="highlight highlight-source-rust notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;&lt;span class="pl-k"&gt;use&lt;/span&gt; grillon&lt;span class="pl-kos"&gt;::&lt;/span&gt;&lt;span class="pl-kos"&gt;{&lt;/span&gt;dsl&lt;span class="pl-kos"&gt;::&lt;/span&gt;&lt;span class="pl-c1"&gt;*&lt;/span&gt;&lt;span class="pl-kos"&gt;,&lt;/span&gt; dsl&lt;span class="pl-kos"&gt;::&lt;/span&gt;http&lt;span class="pl-kos"&gt;::&lt;/span&gt;&lt;span class="pl-c1"&gt;*&lt;/span&gt;&lt;span class="pl-kos"&gt;,&lt;/span&gt; json&lt;span class="pl-kos"&gt;,&lt;/span&gt; &lt;span class="pl-v"&gt;Grillon&lt;/span&gt;&lt;span class="pl-kos"&gt;,&lt;/span&gt; &lt;span class="pl-v"&gt;StatusCode&lt;/span&gt;&lt;span class="pl-kos"&gt;,&lt;/span&gt; &lt;span class="pl-v"&gt;Result&lt;/span&gt;&lt;span class="pl-kos"&gt;}&lt;/span&gt;&lt;span class="pl-kos"&gt;;&lt;/span&gt;
&lt;span class="pl-k"&gt;use&lt;/span&gt; grillon&lt;span class="pl-kos"&gt;::&lt;/span&gt;&lt;/pre&gt;…
&lt;/div&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/theredfish/grillon" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;I'm currently focusing on HTTP testing features and ensuring a good developer experience (API, book, global documentation, examples). My goal is to make it easier for people to navigate the project and contribute.&lt;/p&gt;

&lt;h2&gt;
  
  
  An expressive API
&lt;/h2&gt;

&lt;p&gt;My priority is to offer a great developer experience through an API that feels natural and intuitive to use. The &lt;a href="https://github.com/owlduty/grillon/releases/tag/v0.4.0" rel="noopener noreferrer"&gt;v0.4.0&lt;/a&gt; comes with many improvements to compose assertions with predicates.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="nn"&gt;Grillon&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"http://jsonplaceholder.typicode.com"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;
  &lt;span class="nf"&gt;.post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"posts"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="nf"&gt;.payload&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nd"&gt;json!&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="s"&gt;"title"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"foo"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s"&gt;"body"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"bar"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s"&gt;"userId"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
  &lt;span class="p"&gt;}))&lt;/span&gt;
  &lt;span class="nf"&gt;.assert&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
  &lt;span class="k"&gt;.await&lt;/span&gt;
  &lt;span class="nf"&gt;.status&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;is_success&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
  &lt;span class="nf"&gt;.status&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;is&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;201&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
  &lt;span class="nf"&gt;.response_time&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;is_less_than&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
  &lt;span class="nf"&gt;.json_body&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;is&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nd"&gt;json!&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="s"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;101&lt;/span&gt;
  &lt;span class="p"&gt;})));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here is the current list of assertions supported with predicates for HTTP:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;status: &lt;code&gt;is&lt;/code&gt;, &lt;code&gt;is_not&lt;/code&gt;, &lt;code&gt;is_between&lt;/code&gt;, &lt;code&gt;is_success&lt;/code&gt;, &lt;code&gt;is_client_error&lt;/code&gt;, &lt;code&gt;is_server_error&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;response time: &lt;code&gt;is_less_than&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;headers: &lt;code&gt;is&lt;/code&gt;, &lt;code&gt;is_not&lt;/code&gt;, &lt;code&gt;contains&lt;/code&gt;, &lt;code&gt;does_not_contain&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;body: &lt;code&gt;is&lt;/code&gt;, &lt;code&gt;is_not&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each predicate function can take one or more types compatible with the tested subject. For example with &lt;code&gt;status&lt;/code&gt;, the &lt;code&gt;is&lt;/code&gt; predicate  accepts these different types: &lt;code&gt;Range&amp;lt;u16&amp;gt;&lt;/code&gt; (between), &lt;code&gt;u16&lt;/code&gt;, &lt;code&gt;StatusCode&lt;/code&gt;. &lt;/p&gt;

&lt;h3&gt;
  
  
  Write your own assertion logic
&lt;/h3&gt;

&lt;p&gt;While waiting for more built-in test functions (like json path for &lt;code&gt;body&lt;/code&gt;), or if you have a specific need, you can use the &lt;code&gt;assert_fn&lt;/code&gt; function. It allows you to access the internal representation of an http response under test through an instance of &lt;code&gt;Assert&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="c1"&gt;// ...&lt;/span&gt;
&lt;span class="nf"&gt;.assert_fn&lt;/span&gt;&lt;span class="p"&gt;(|&lt;/span&gt;&lt;span class="n"&gt;assert&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nd"&gt;assert!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;assert&lt;/span&gt;&lt;span class="py"&gt;.headers&lt;/span&gt;&lt;span class="nf"&gt;.is_empty&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
  &lt;span class="nd"&gt;assert!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;assert&lt;/span&gt;&lt;span class="py"&gt;.status&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="nn"&gt;StatusCode&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;CREATED&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nd"&gt;assert!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;assert&lt;/span&gt;&lt;span class="py"&gt;.json&lt;/span&gt;&lt;span class="nf"&gt;.is_some&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;

  &lt;span class="nd"&gt;println!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Json response : {:#?}"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;assert&lt;/span&gt;&lt;span class="py"&gt;.json&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Configure your logs
&lt;/h3&gt;

&lt;p&gt;As I'm using the library for Owl Duty I need to output json data. I decided to make the logs configurable so you can choose what best suits your needs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;StdAssert&lt;/code&gt;: only prints assertion failures via &lt;code&gt;std::assert&lt;/code&gt; macro. This is the default mode.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;StdOut&lt;/code&gt;: prints all assertion results to standard output.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Json&lt;/code&gt;: formats assertion results into json output.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you configure your log settings like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="nn"&gt;Grillon&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"http://jsonplaceholder.typicode.com"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;
  &lt;span class="nf"&gt;.log_settings&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nn"&gt;LogSettings&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;Json&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here is an example of json output you will get from an assertion:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="nl"&gt;"left"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;201&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="nl"&gt;"part"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"status code"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="nl"&gt;"predicate"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"should be"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="nl"&gt;"result"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"passed"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="nl"&gt;"right"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;201&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  When to use Grillon?
&lt;/h2&gt;

&lt;p&gt;Mainly when you want to test live APIs, here is a non-exhaustive list:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Endpoint monitoring&lt;/li&gt;
&lt;li&gt;Synthetic monitoring&lt;/li&gt;
&lt;li&gt;Integration tests&lt;/li&gt;
&lt;li&gt;Automated API calls (scripts)&lt;/li&gt;
&lt;li&gt;E2E API tests&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It really depends on your needs. The thing is, Grillon is flexible and as long as you want to automate API calls, it will be a good choice. Note however that some features are missing(*) for the moment (client certificates, HTTP 2, ...). I'm on it! If you're interested in a particular feature or would like to contribute, you can check the &lt;a href="https://github.com/owlduty/grillon/issues" rel="noopener noreferrer"&gt;issues&lt;/a&gt;.&lt;/p&gt;




&lt;p&gt;(*) &lt;em&gt;but you can still provide your own http client and response handler by implementing the &lt;code&gt;Response&lt;/code&gt; trait (&lt;a href="https://docs.rs/grillon/latest/grillon/response/trait.Response.html" rel="noopener noreferrer"&gt;see api doc&lt;/a&gt;).&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What's next
&lt;/h2&gt;

&lt;p&gt;As I briefly mentioned, I will first focus on the documentation and developer experience (book, examples, ...). Then I'll work on extending HTTP testing functionality, supporting more protocols, making it easier to run in pipelines and outside of Rust projects, producing logs, metrics, tracing, ... everything to deliver a production-ready test library.&lt;/p&gt;

&lt;p&gt;Thanks for reading! Happy hacking/coding!&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>rust</category>
      <category>testing</category>
      <category>api</category>
    </item>
  </channel>
</rss>
