Quick Start

Quick Start #

Let’s get you rolling with SoftwareTesting.ai

Welcome to the Quick Start Guide for SoftwareTesting.ai! This guide is designed to get you up and running quickly with our powerful code analysis and testing tool. By following this guide, you will have:

  • integrated SoftwareTesting.ai into your CI/CD,
  • enabled SoftwareTesting.ai to analyze your code coverage
  • and viewed code coverage suggestions for your most recent pull request.

Let’s dive in and get started!

Prerequisites #

Before we get started, we will need the following set up:

  1. Installed the GitHub App

Note: SoftwareTesting.ai currently only supports GitHub, if you are interested in using SoftwareTesting.ai with other version control systems, let us know here 👇 https://tally.so/r/wk9K76

  1. GitHub Actions Pipeline that
    • runs tests and
    • collects coverage reports

Note: If you need help creating a GitHub Actions Pipeline that runs tests and collects coverage reports see our guide here

Getting Started #

Step 1: Set Repository Permissions #

In order for SoftwareTesting.ai to help you improve your code coverage we need permission to access the repos you want to use us with Step1

Step 2: Configure GitHub Actions #

Configuring GitHub Actions is a crucial part of integrating SoftwareTesting.ai with your project. This action will enable our tool to analyze your code coverage, identify gaps, and automatically generate unit tests to improve your coverage. It serves as the bridge connecting your repository to our AI-powered testing platform.

In order for SoftwareTesting.ai to successfully pull your code coverage reports, the following requirements must be met:

  1. All artifacts you want SoftwareTesting.ai to analayze are included in a Job called “Check Coverage”
  2. Coverage Summary Report artifact is named “coverage-summary-report”
  3. In depth coverage report is named “coverage-report”

By using these names SoftwareTesting.ai will be able to analyze the correct artifact and provide accurate test coverage solutions to your coverage gaps.

Example GitHub Actions File #

Here is an example GitHub Actions Pipeline that will enable SoftwareTesting.ai to successfully analyze your coverage

name: GitHub Actions

on: [pull_request]

    runs-on: ubuntu-latest

    - uses: actions/checkout@v3
    - name: Use Node.js 16.x
      uses: actions/setup-node@v3
        node-version: '16.x'
    - name: Install dependencies
      run: npm ci
    - name: Run Jest tests and generate coverage report
      run: npm test -- --coverage --coverageReporters="json-summary" --coverageReporters="json"
    - name: Archive coverage report (json-summary)
      uses: actions/upload-artifact@v3
        name: coverage-summary-report
        path: coverage/coverage-summary.json
    - name: Archive coverage report (json)
      uses: actions/upload-artifact@v3
        name: coverage-report
        path: coverage/coverage-final.json

Note: Using the example GitHub Actions pipeline in Step 2 will trigger SoftwareTesting.ai to analyze your code coverage on each push to a Pull Request. You can trigger SoftwareTesting.ai to run on all the occurances a GitHub Actions pipeline can be triggered. See the GitHub Actions Docs for the outline of those occurances and how to trigger them.

Step 3: Test it out! #

SoftwareTesting.ai should now be enabled for your repository! Try it out by creating a new PR and running tests!

Running into trouble getting SoftwareTesting.ai working? Reach out to our support team any time at support@softwaretesting.ai