Skip to content
Merged
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
.DEFAULT_GOAL := build
.PHONY: clean fmt vet lint build run release
.PHONY: clean fmt vet lint test build install run release
VERSION ?= $(shell git describe --tags --always --dirty 2>/dev/null || echo dev)
LDFLAGS := -s -w -X github.com/DataDog/ddtest/internal/buildinfo.Version=$(VERSION)
GOBIN ?= $(shell go env GOBIN)
ifeq ($(strip $(GOBIN)),)
GOBIN := $(firstword $(subst :, ,$(shell go env GOPATH)))/bin
endif
clean:
go clean -i -x
fmt:
Expand All @@ -14,6 +18,9 @@ test:
go test ./...
build: test lint
go build -ldflags="$(LDFLAGS)" -o ddtest main.go
install:
GOBIN="$(GOBIN)" go install -ldflags="$(LDFLAGS)" .
@echo "Installed ddtest to $(GOBIN)/ddtest"
run:
go run main.go
release:
Expand Down
28 changes: 27 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,28 @@ Currently supported:
- Python with pytest.
- JavaScript with Cucumber, Cypress, Jest, Mocha, Playwright, or Vitest.

## Try Test Optimization locally

With your project's test dependencies and any required browsers/services ready:

```sh
ddtest onboard # GitHub Actions setup instructions
ddtest testdrive # Preview, confirm, and run tests locally
```

No Datadog account or Agent is needed. Testdrive links to an HTML report under
`.testoptimization/testdrive/`. Use `--yes` after reviewing the preview in
non-interactive sessions, `--framework` to select a runner, and `--command` for
package scripts or custom setup.

Testdrive reuses a detected project tracer; otherwise it installs the latest
release (`--tracer-version` selects a fallback release or `git:<ref>`).
JavaScript/Python installs are isolated. Ruby runs `bundle add datadog-ci`,
updating the project's Gemfile and lockfile.

## Prerequisites

Before using DDTest, you must have **Datadog Test Optimization** already set up and enabled with a Datadog Test Optimization library for your language and framework. DDTest relies on this integration to discover your tests and plan test execution accordingly.
Before using `ddtest plan` or `ddtest run`, you must have **Datadog Test Optimization** already set up and enabled with a Datadog Test Optimization library for your language and framework. DDTest relies on this integration to discover your tests and plan test execution accordingly.

Minimum supported library and runtime requirements:

Expand Down Expand Up @@ -232,6 +251,13 @@ For all flags, environment variables, and defaults, see

## Installation

To install from a checkout:

```sh
make install # GOBIN, or the first GOPATH entry's bin
make install GOBIN="$HOME/.local/bin" # Custom destination; add it to PATH
```

This project uses GitHub Releases for distribution.

Use `gh` command line tool to download the latest release in GitHub actions:
Expand Down
Loading