Search

Quickstart Guide

To get up and running quickly with CodeComet, follow these steps:

Create a CodeComet account

Navigate to https://app.codecomet.io/signup and create a new account.

Go to Settings > API Key and copy the pre-generated API Key for you. You will need to input this into the CLI app.

Install the CodeComet CLI app

Navigate to https://github.com/codecomet-io/cli/releases, then download the latest release zip file for your operating system. Unzip the file to your desired directory. This will create a codecomet executable.

Here are the sample commands for downloading and installing the v1.1.0 of our Linux release (please modify as needed):

# Download the v1.1.0 release for Linux
export CCVERSION=1.1.0
curl -L -o codecomet-cli.tar.gz https://github.com/codecomet-io/cli/releases/download/v${CCVERSION}/codecomet-v${CCVERSION}-linux-amd64.tar.gz

# Decompress the CLI tool
tar -xzvf codecomet-cli.tar.gz -C

Run your test suite

First, set up an environment variable CODECOMET_API_KEY with your API Key. For example:

export CODECOMET_API_KEY=<your_api_key>

Then, using the CodeComet CLI app, execute your test suite using a version of these example commands:

codecomet --suite "Sample Test Suite" -- go test ./...

or

pip install pytest-cov pytest-reportlog && codecomet --suite "Sample Test Suite" -- pytest

or

jest --ci --reporters=jest-junit && codecomet --suite "Sample Test Suite" junit junit.xml

For more details, please check out our Test Framework Guides.

View results in the CodeComet web app

Once your test suite has executed, go to https://app.codecomet.io/repos to view the results. Select the test suite run you'd like to inspect, and drill down into the particulars of each test.

Integrate CodeComet into your CI workflow

Once you are familiar with CodeComet’s CLI app, it’s time to incorporate it into your CI workflow.

CircleCI

For CircleCI, modify your .circleci/config.yaml as follows:

orbs:
  codecomet-orb: codecomet/codecomet-orb@1.0.0

# ...
# Then, inside your build job
  - codecomet-orb/install
  - codecomet-orb/ingest:
      # Your test command should go here:
      test_command: go test ./...
      # Your test suite should have the same unique name every time it's run:
      test_suite_name

GitHub Actions

For GitHub Actions, modify your .github/workflows/workflow.yaml as follows:

  # Add an action to run your tests with the CodeComet action:
  - name: Run tests
    uses: codecomet-io/setup-and-run@v1.3
    env:
      # You can save the CODECOMET_API_KEY in your repo's secrets:
      CODECOMET_API_KEY: ${{ secrets.CODECOMET_API_KEY }}
    with:
      # Your test command
      test_command: pytest
      test_suite_name

For other CI systems, please visit our CI Integration Guides.

Set up your CodeComet web app

At this point, you’re pretty much good to go. Simply log back into the app at https://app.codecomet.io to view the results of your tests.

Once you’ve configured the CLI in your CI workflow, it’ll ingest test suite execution results on every run. You can choose to manually view these results at your convenience in the web app, or export them to a few different formats for further analysis.