List test cases
Returns a paginated list of the scoped project’s test cases with optional filtering, along with the project’s latest test-cases sync error.
curl --request GET \
--url https://api.empirical.run/api/v2/test-cases \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.empirical.run/api/v2/test-cases"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.empirical.run/api/v2/test-cases', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.empirical.run/api/v2/test-cases",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.empirical.run/api/v2/test-cases"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.empirical.run/api/v2/test-cases")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.empirical.run/api/v2/test-cases")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"test_cases": [
{
"id": "<string>",
"name": "<string>",
"file_path": "<string>",
"suites": [
"<string>"
],
"playwright_project": "<string>",
"tags": [
"<string>"
],
"created_at": "<string>",
"updated_at": "<string>",
"first_seen_commit_sha": "<string>",
"last_seen_commit_sha": "<string>",
"dependencies": {
"playwright_serial": {
"group_id": "<string>",
"title_path": [
"<string>"
],
"file_path": "<string>",
"playwright_project": "<string>",
"dependency_order": 123,
"group_size": 123,
"depends_on": [
"<string>"
]
}
}
}
],
"sync_error": {
"message": "<string>",
"occurred_at": "<string>"
}
},
"pagination": {
"page": 123,
"per_page": 123,
"total": 123,
"total_pages": 123,
"has_more": true
}
}{
"data": "<unknown>",
"error": {
"message": "<string>"
}
}{
"data": "<unknown>",
"error": {
"message": "<string>"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Comma-separated Playwright test IDs to filter by. Capped at the first 100.
Filter to test cases whose file path starts with this value.
Filter to test cases in this Playwright project.
Comma-separated tags; returns test cases having any of the given tags.
Free-text search across the test case name and file path.
Filter to test cases first seen at this commit SHA.
Filter to test cases last seen at this commit SHA.
When true (default), restrict to test cases present at the project's last synced commit. Set false to include all test cases.
true, false Page number (1-indexed). Defaults to 1.
x >= 1Items per page. Defaults to 100.
x >= 1Was this page helpful?
curl --request GET \
--url https://api.empirical.run/api/v2/test-cases \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.empirical.run/api/v2/test-cases"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.empirical.run/api/v2/test-cases', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.empirical.run/api/v2/test-cases",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.empirical.run/api/v2/test-cases"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.empirical.run/api/v2/test-cases")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.empirical.run/api/v2/test-cases")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"test_cases": [
{
"id": "<string>",
"name": "<string>",
"file_path": "<string>",
"suites": [
"<string>"
],
"playwright_project": "<string>",
"tags": [
"<string>"
],
"created_at": "<string>",
"updated_at": "<string>",
"first_seen_commit_sha": "<string>",
"last_seen_commit_sha": "<string>",
"dependencies": {
"playwright_serial": {
"group_id": "<string>",
"title_path": [
"<string>"
],
"file_path": "<string>",
"playwright_project": "<string>",
"dependency_order": 123,
"group_size": 123,
"depends_on": [
"<string>"
]
}
}
}
],
"sync_error": {
"message": "<string>",
"occurred_at": "<string>"
}
},
"pagination": {
"page": 123,
"per_page": 123,
"total": 123,
"total_pages": 123,
"has_more": true
}
}{
"data": "<unknown>",
"error": {
"message": "<string>"
}
}{
"data": "<unknown>",
"error": {
"message": "<string>"
}
}