Step CI - The API Quality Assurance Framework
Written by Nikos Vaggalis   
Thursday, 09 November 2023

Power up your API testing inside your CI workflow with Step CI, a free open-source tool that has also introduced a paid Support Plan.

 

Step CI is another tool to have in your developer's toolbelt.We had a look at a few others recently. These were OpenAPI Diff, AWS Smithy and Redocly CLI, each one having its own purpose:

OpenAPI Diff, or Oasdiff for short, is an open source utility
that takes comparing OpenAPI specs to identify breaking changes to a whole new level.

Smithy is an open source project by AWS with which you can model your APIs, generate code and documentation for clients and servers, as well as other artifacts, in many programming languages.

Redocly is an open source tool written in Typescript that
assists in managing your APIs effectively. It empowers developers to comply to API design standards, produce excellent documentation, and expedite development cycles.

Step CI then is mainly used for test automation incorporated into the CI pipeline, sporting the following properties:

  • Language-agnostic. Configure easily using YAML, JSON or JavaScript
  • REST, GraphQL, gRPC, tRPC, SOAP. Test different API types in one workflow
  • Self-hosted. Test services on your network, locally and CI/CD
  • Integrated. Play nicely with others

It excels at unit testing your APIs checking if a new change broke the set contract, ensuring the reliability and functionality of the API and can help identify and fix any issues before the API is released to the public.

Testing HTTP APIs involves verifying that the API functions properly and that it can handle various types of input and output data. This typically involves sending requests to the API and examining the responses to ensure that they are correct and meet the expectations of the developer.StepCI does that basing on a few building blocks:

  • Workflows
    Workflows contain meta information, tests and default configuration
  • Tests
    Tests describe different test suites. Tests can have multiple steps. Tests are executed concurrently. Each test has a separate context, shared across steps
  • Steps
    Steps are the instructions to be executed by the runner. Steps contain the request parameters, captures and checks. Steps are executed in a sequence. If one step fails, all the following steps are skipped. Steps have access to shared context
  • Captures
    Steps can specify captures to capture data from responses into named variables that can later be used in consequent requests. Also known as "request chaining"
  • Checks
    Steps can include checks to validate responses
  • Matchers
    Matchers can be used to match values against a pre-defined set of rules
  • Reusables
    Reusables allow you to reuse content such as schemas and credentials without repetition

For instance, after setting the Workflow and Tests part, here's what the Steps part would look like in testing an API:

StepCI can also do Load and Fuzz testing along with using Fake data.The Step CI runner can also be used as a Library
so that it can be programmatically imported in Node projects.

To start with,initialize a worflow and write yot own:

npx stepci init

or generate workflows from your API spec on the fly

stepci generate https://petstore3.swagger.io/api/v3/openapi.json

Then run it:

npx stepci run workflow.yml

If those features weren't enough to persuade you to give StepCI a shot, here's another reason to:
Another advantage that this tool has over others like Insomnia and Postman, is that unlike those two who recently
introduced a mandatory login in order to open and save collections, while the collections being uploaded to the cloud automatically, Step CI stores tests locally and runs on your own CI/CD.

Step CI is open source and can be selfhosted, but there's also a paid version with a Support Plan which covers support (with SLA), onboarding, prioritized feature requests and bug resolution.

 stepci logo

More Information

StepCI Github

Step CI website

Related Articles

OpenAPI Diff Prevents API Breakages

Model Your APIs With AWS Smithy

Redocly CLI - The Super Tool For API Management

 

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

Banner


GitHub Introduces Code Scanning
26/03/2024

GitHub has announced a public beta of a code scanner that automatically fixes problems. The new feature was announced back in November, but has now moved to public beta status.  



Udacity's New Discovering Ethical AI Course
12/04/2024

Udacity has just launched an hour-long course on Ethical AI. Intended for a wide audience across many industries, it introduces to basic concepts and terms needed to step into the world of Ethica [ ... ]


More News

raspberry pi books

 

Comments




or email your comment to: comments@i-programmer.info

Last Updated ( Thursday, 09 November 2023 )