Run an app's tests (AS14)
curl --request POST \
--url https://api.eddy.engineer/v1/apps/{id}/tests \
--header 'Content-Type: application/json' \
--data '
{
"rev": "<string>"
}
'import requests
url = "https://api.eddy.engineer/v1/apps/{id}/tests"
payload = { "rev": "<string>" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({rev: '<string>'})
};
fetch('https://api.eddy.engineer/v1/apps/{id}/tests', 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.eddy.engineer/v1/apps/{id}/tests",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'rev' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.eddy.engineer/v1/apps/{id}/tests"
payload := strings.NewReader("{\n \"rev\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.eddy.engineer/v1/apps/{id}/tests")
.header("Content-Type", "application/json")
.body("{\n \"rev\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/apps/{id}/tests")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"rev\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"cases": [
{}
],
"failed": 123,
"passed": 123
}Meta
Run an app's tests (AS14)
Runs the manifest's `tests` on a revision (`rev`) or the draft: each case is a function run with its inputs; each expectation (`value` or `[op, value]`, op one of < <= > >= == != ≈) is compared in its own units against the function's declared output quantity — another kind is refused, never converted; ≈ is within 1 %. Reports per case: pass, each expectation with the actual value written in the expectation's unit, the run key and its result keys, or the error that stopped the run. AS15: the draft (no `rev`) is for editors (403 PROJECT_FORBIDDEN); an app's token acts only for its own app and revision (403 SCOPE_DENIED).
POST
/
v1
/
apps
/
{id}
/
tests
Run an app's tests (AS14)
curl --request POST \
--url https://api.eddy.engineer/v1/apps/{id}/tests \
--header 'Content-Type: application/json' \
--data '
{
"rev": "<string>"
}
'import requests
url = "https://api.eddy.engineer/v1/apps/{id}/tests"
payload = { "rev": "<string>" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({rev: '<string>'})
};
fetch('https://api.eddy.engineer/v1/apps/{id}/tests', 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.eddy.engineer/v1/apps/{id}/tests",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'rev' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.eddy.engineer/v1/apps/{id}/tests"
payload := strings.NewReader("{\n \"rev\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.eddy.engineer/v1/apps/{id}/tests")
.header("Content-Type", "application/json")
.body("{\n \"rev\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/apps/{id}/tests")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"rev\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"cases": [
{}
],
"failed": 123,
"passed": 123
}