Live data from Hacker News

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

stepci.com

21–30 of 53 posts

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

#21
post #12

Really cool, with already a lot of features! Given the raise of CI/CD, I really think these kind of tools (CLI tests on HTTP requests), based on a simple format, will be really important. We've build Hurl ( https://github.com/Orange-OpenSource/hurl ), 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…

Oh, nice to meet you! Our Matcher functionality was actually inspired by Hurl (you call them predicates!)! We would take your inspiration from us as a huge compliment :) The main difference between Hurl and Step CI is from our persepective an ideological one. What do you think? Hurl is a CLI tool, while Step CI is a library. This means that you can include our Test Runner ( https://github.com/stepci/runner ) and use…

Yes, I can see that! We focus on the CLI and I see how Step CI can shine. Happy to be a (small) source of inspiration. Good luck with Step CI!

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

#22

Love it! > "never have to write and maintain your tests again!" this feels a bit misleading though. What are you doing step ci? :D

We have been watching you and we know testing APIs is your hobby and you spend a lot of time on it. We'll have to take it away from you! ;) Just give us a little more time and hopefully your support. :)

Haha! love the spirit! :)

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

#23
post #18

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?

Thank you for the question!:)

You can generate tests from your OpenAPI definition using the “import from OpenAPI” button on our website.

The tests are generated from your request/response examples. If there are no examples given/available, we will generate examples for you based on the schema provided.

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

#24
post #18

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?

Thank you for the question!:) You can generate tests from your OpenAPI definition using the “import from OpenAPI” button on our website. The tests are generated from your request/response examples. If there are no examples given/available, we will generate examples for you based on the schema provided.

Thanks for the quick answer! Are the examples generated based on the types? As in if a field is set as an integer, the tests will pass arbitrary integers? But still how does it know how to produce positive examples? Do you maybe have some documentation on this functionality?

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

#25

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 https://github.com/ovh/venom

Hi, this is Sebastian from Step CI Thanks for sharing Venom! Certainly, there are lots of tools in the space, both SaaS and open-source. Mish and I can name you a few! However, there’s one thing these tools seem to be missing - a greater goal. Our vision is to give you a tool that will free you from writing and maintaining API tests ever again - in any shape or form. What you currently see from us is the first step!

> Venom is a CLI (Command Line Interface) that aim to create, manage and run your integration tests with efficiency.

The linked repo seems to have a greater goal.

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

#26
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)

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

#27
post #5
post #3

How do you deal with state between API calls? (For example, a user filling a shopping cart, getting discounts based on their geo/products and then checking out)

Hello, this is Mish from Step CI Thanks for your question! We allow you to capture content like headers, response and cookies between steps using captures, check out the "Captures" example in our Demo Here's a documentation with examples for all capture types: https://github.com/stepci/stepci/blob/main/docs/workflow-syn... also: we manage cookies for you automatically

Does capture implement what I'm trying to discuss here? https://github.com/stepci/stepci/discussions/17

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

#29
post #28

Yo, I tried uploading my openapi.json file and all I got was a big error on the right hand side.

In the console:

``` Uncaught YAMLParseError: The : indicator must be at most 1024 chars after the start of an implicit block mapping key at line 5551, column 3:

    #     $ref: '#/components/schemas/String'
  schemas:
  ^^^^^^^
```

Edit: Apparently I have some validation errors when pasting into the Swagger Editor. That must be why; will have to fix those up and try again.

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

#30

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?

We’re sorry to hear that! Would you mind sharing some context with us? Our OpenAPI (Swagger) integration is currently in Beta and only available through our website. We acknowledge, that it is not ready for prime-time just yet Everything we do is open-source. You can see the list of issues in the repository and contribute if possible: https://github.com/stepci/plugin-openapi/issues Disclaimer: We have tested our Open…

Swagger has the ability to turn api definition to libraries in any language. It is too verbose
Post reply on HN