TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: We built a tool that automatically generates API tests

108 pointsby Wissmuellerover 2 years ago
Hi, this is Mish and Sebastian. We are working on Step CI - a fully automated API testing platform for developers.<p>Step CI works programming-language independent and for different API paradigms (REST, GraphQL, XML).<p>Our CLI and test runner are available on GitHub (<a href="https:&#x2F;&#x2F;github.com&#x2F;stepci" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;stepci</a>) under the MPLv2 license.<p>Since our last launch, Step CI is now able to generate automated tests for your API based on your OpenAPI (Swagger) spec. This saves you a lot of time as you never have to write and maintain your tests again!<p>We would like to invite you to try our tool and give us feedback! Please star us on GitHub, if you like what we are working on!<p>We are very thankful for your attention and any feedback or suggestions we receive from you :)<p>Mish and Sebastian from Germany

19 comments

thihtover 2 years ago
From my experience, generated tests are worthless for anything more serious than smoke tests. I prefer working with no tests than automated tests, I feel they give you a false sense of confidence.<p>The Step CI engine itself looks good though. It looks like a cleaner, but less powerful version of a tool (open source, build in-house) we used when I worked at OVHcloud, Venom: <a href="https:&#x2F;&#x2F;github.com&#x2F;ovh&#x2F;venom" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;ovh&#x2F;venom</a><p>Here&#x27;s an example test file for the HTTP executor of Venom: <a href="https:&#x2F;&#x2F;github.com&#x2F;ovh&#x2F;venom&#x2F;blob&#x2F;master&#x2F;tests&#x2F;http.yml" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;ovh&#x2F;venom&#x2F;blob&#x2F;master&#x2F;tests&#x2F;http.yml</a> it&#x27;s very close to Step CI format.<p>I&#x27;d still use Venom because it&#x27;s way more powerful (you have DB executors for example, so after executing a POST request you can actually check in DB that you have what you expect) and I prefer focusing on actually writing integration tests instead of generating them.<p>Maybe this post sounds harsh (I feel it as I write it because I have strong feelings against test generation) but I think your approach is a good one for actually writing automated tests. Testing APIs declaratively like this has a great benefit: your tests work on an interface. You can migrate your API to a whole new stack and your tests remain the same. I did it multiple time at OVHcloud: one time migrating a huge API from a Go router to another (Gin-&gt;Echo), and another time migrating public APIs from a legacy, in-house Perl engine to a Go server.
评论 #33161228 未加载
评论 #33161334 未加载
LeonidBugaevover 2 years ago
If you are looking for a more general tool, which can do not only API tests, but also interact with Databases and etc, but still use declrative syntax, try Venom <a href="https:&#x2F;&#x2F;github.com&#x2F;ovh&#x2F;venom" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;ovh&#x2F;venom</a>
评论 #33153055 未加载
评论 #33159273 未加载
评论 #33152822 未加载
inglorover 2 years ago
How do you deal with state between API calls? (For example, a user filling a shopping cart, getting discounts based on their geo&#x2F;products and then checking out)
评论 #33151969 未加载
jiceaover 2 years ago
Really cool, with already a lot of features!<p>Given the raise of CI&#x2F;CD, I really think these kind of tools (CLI tests on HTTP requests), based on a simple format, will be really important. We&#x27;ve build Hurl (<a href="https:&#x2F;&#x2F;github.com&#x2F;Orange-OpenSource&#x2F;hurl" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Orange-OpenSource&#x2F;hurl</a>), that shares a lot of similarities with Step CI (plain text instead of yaml, captures, jsonpath, xpath etc...). I will shamelessly take inspiration for some new features (like GraphQL for instance)!
评论 #33153949 未加载
fernandopjover 2 years ago
Fantastic project. I worked on something similar that had the same approach, but the main goal was to test availability in different environments (dev, stage, production) against the same tests. We also had the feature of using the result of one test as input to another, so a complete user case from an API could be tested (auth, POST data, GET results)
mkl95over 2 years ago
OpenAPI Generator + This tool + some good UI would be a killer combination
airockerover 2 years ago
Hi , I tried to build cli from swagger, it was a disaster: very verbose and did not really work. I am wondering what’s the verbosity of your tool. How do you deal with imperfect specs?
评论 #33154075 未加载
SeriousMover 2 years ago
Some years ago I setup postman tests and run it with cli during deployment tests. The whole hassle with postman ui just makes it really not fun work with it even for simple tasks depending on each other. I wanted to use restclient from vscode where you just define requests in a raw format but there was no usable output to process for azure devops. I will give this project a chance to get things done in a convenient way. Thanks!
评论 #33161043 未加载
barefegover 2 years ago
I was looking in the site to understand the automatic generation of tests from OpenAPI but I couldn’t find it. Maybe it’s very obvious but I missed it. Does it mean that it produces test cases from the examples provided? Or how does it figure out the request response pairs?
评论 #33154442 未加载
yuvalsteuerover 2 years ago
Love it!<p>&gt; &quot;never have to write and maintain your tests again!&quot;<p>this feels a bit misleading though.<p>What are you doing step ci? :D
评论 #33154025 未加载
APhoenixRisesover 2 years ago
How does Step CI handle testing business logic? I don&#x27;t see how anything other than input&#x2F;boundary testing could be generated automatically.
评论 #33161034 未加载
评论 #33158132 未加载
BerislavLopacover 2 years ago
How does this compare to Schemathesis [0]?<p>[0] <a href="https:&#x2F;&#x2F;schemathesis.readthedocs.io" rel="nofollow">https:&#x2F;&#x2F;schemathesis.readthedocs.io</a>
评论 #33161019 未加载
reagan83over 2 years ago
This is a great idea &amp; brilliantly executed. I love to see the innovation in this space. Nice work Mish and Sebastian!
fernandorojoover 2 years ago
Cool idea. I’ll definitely check it out. We’ve been thinking of making something similar internally.
评论 #33151920 未加载
jzigover 2 years ago
Yo, I tried uploading my openapi.json file and all I got was a big error on the right hand side.
评论 #33155955 未加载
yuvalsteuerover 2 years ago
BTW I appreciate good UI, your site is incredible, how did you build it?
评论 #33160987 未加载
raydiatianover 2 years ago
Way to go guys.
manishranaover 2 years ago
This is really a useful tool
mrwnmonmover 2 years ago
love the design