Skip to content

Commit

Permalink
Updated Test Suite docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Tacke committed Oct 10, 2021
1 parent e1b8150 commit 821591c
Show file tree
Hide file tree
Showing 10 changed files with 328 additions and 9 deletions.
12 changes: 8 additions & 4 deletions Meadow.TestSuite.sln
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,15 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests.Meadow.Core.F7", "Tes
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{085FCF8D-543A-465C-B239-BCEFC3B75537}"
ProjectSection(SolutionItems) = preProject
authoring-tests.md = authoring-tests.md
implementation.md = implementation.md
readme.md = readme.md
setup.md = setup.md
usage.md = usage.md
doc\authoring-tests.md = doc\authoring-tests.md
doc\usage.md = doc\usage.md
doc\TestSuite.postman_collection.json = doc\TestSuite.postman_collection.json
doc\setup.md = doc\setup.md
doc\raspi.md = doc\raspi.md
doc\implementation.md = doc\implementation.md
rest-api.md = rest-api.md
config.md = config.md
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Meadow.TestSuite.Director", "Meadow.TestSuite.Director\Meadow.TestSuite.Director.csproj", "{88D83E30-8507-4007-9F60-69A57D0A6636}"
Expand Down
278 changes: 278 additions & 0 deletions doc/TestSuite.postman_collection.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,278 @@
{
"info": {
"_postman_id": "b3befbd8-b926-4cac-aad5-508ce0392c0c",
"name": "TestSuite",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Time",
"item": [
{
"name": "Get Time",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "http://{{meadow-address}}:{{meadow-port}}/time",
"protocol": "http",
"host": [
"{{meadow-address}}"
],
"port": "{{meadow-port}}",
"path": [
"time"
]
}
},
"response": []
},
{
"name": "Set Time",
"request": {
"method": "PUT",
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"SystemTime\": \"{{$isoTimestamp}}\"\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "http://{{meadow-address}}:{{meadow-port}}/time",
"protocol": "http",
"host": [
"{{meadow-address}}"
],
"port": "{{meadow-port}}",
"path": [
"time"
]
}
},
"response": []
}
]
},
{
"name": "Assemblies",
"item": [
{
"name": "Add or Update Assembly",
"request": {
"method": "PUT",
"header": [],
"body": {
"mode": "file",
"file": {
"src": "/Users/christophertacke/repos/wilderness/Meadow.TestSuite/Tests.Meadow.Core/bin/Debug/netstandard2.1/Tests.Meadow.Core.dll"
}
},
"url": {
"raw": "http://{{meadow-address}}:{{meadow-port}}/assemblies/Tests.Meadow.Core",
"protocol": "http",
"host": [
"{{meadow-address}}"
],
"port": "{{meadow-port}}",
"path": [
"assemblies",
"Tests.Meadow.Core"
]
}
},
"response": []
},
{
"name": "Get Assemblies",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "http://{{meadow-address}}:{{meadow-port}}/assemblies",
"protocol": "http",
"host": [
"{{meadow-address}}"
],
"port": "{{meadow-port}}",
"path": [
"assemblies"
]
}
},
"response": []
}
]
},
{
"name": "Tests",
"item": [
{
"name": "Get Tests",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "http://{{meadow-address}}:{{meadow-port}}/tests",
"protocol": "http",
"host": [
"{{meadow-address}}"
],
"port": "{{meadow-port}}",
"path": [
"tests"
]
}
},
"response": []
},
{
"name": "Get Test Info",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "http://{{meadow-address}}:{{meadow-port}}/tests/Tests.Meadow.Core.LEDTests.LedTestFunction",
"protocol": "http",
"host": [
"{{meadow-address}}"
],
"port": "{{meadow-port}}",
"path": [
"tests",
"Tests.Meadow.Core.LEDTests.LedTestFunction"
]
}
},
"response": []
},
{
"name": "Start GPIO Test",
"request": {
"method": "POST",
"header": [],
"url": {
"raw": "http://{{meadow-address}}:{{meadow-port}}/tests/Tests.Meadow.Core.GpioTests.Loopback3_4",
"protocol": "http",
"host": [
"{{meadow-address}}"
],
"port": "{{meadow-port}}",
"path": [
"tests",
"Tests.Meadow.Core.GpioTests.Loopback3_4"
]
}
},
"response": []
},
{
"name": "Start LED Test",
"request": {
"method": "POST",
"header": [],
"url": {
"raw": "http://{{meadow-address}}:{{meadow-port}}/tests/Tests.Meadow.Core.LEDTests.LedTestFunction",
"protocol": "http",
"host": [
"{{meadow-address}}"
],
"port": "{{meadow-port}}",
"path": [
"tests",
"Tests.Meadow.Core.LEDTests.LedTestFunction"
]
}
},
"response": []
}
]
},
{
"name": "Results",
"item": [
{
"name": "Get Specific Test Result By Name",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "http://{{meadow-address}}:{{meadow-port}}/results/Tests.Meadow.Core.LEDTests.LedTestFunction",
"protocol": "http",
"host": [
"{{meadow-address}}"
],
"port": "{{meadow-port}}",
"path": [
"results",
"Tests.Meadow.Core.LEDTests.LedTestFunction"
]
}
},
"response": []
},
{
"name": "Get All Test Results",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "http://{{meadow-address}}:{{meadow-port}}/results",
"protocol": "http",
"host": [
"{{meadow-address}}"
],
"port": "{{meadow-port}}",
"path": [
"results"
]
}
},
"response": []
},
{
"name": "Get Specific Test Result By ID",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "http://{{meadow-address}}:{{meadow-port}}/results/b15e9829-b081-4e69-8343-66107c9076e3",
"protocol": "http",
"host": [
"{{meadow-address}}"
],
"port": "{{meadow-port}}",
"path": [
"results",
"b15e9829-b081-4e69-8343-66107c9076e3"
]
}
},
"response": []
}
]
},
{
"name": "Get TestSuite Info",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "http://{{meadow-address}}:{{meadow-port}}/",
"protocol": "http",
"host": [
"{{meadow-address}}"
],
"port": "{{meadow-port}}",
"path": [
""
]
}
},
"response": []
}
]
}
File renamed without changes.
18 changes: 18 additions & 0 deletions doc/config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Test Suite Worker Configuration

The Test Suite Worker can be configured by modifying and deploying a file named `config.json` to the root (application) folder.

## Example Config File

```
{
"Display": "ST7789",
"Network": {
"SSID": "YOUR_WIFI_SSID",
"Pass": "YOUR_PASSCODE"
},
"Serial": {
"Enabled": false
}
}
```
File renamed without changes.
File renamed without changes.
19 changes: 19 additions & 0 deletions doc/rest-api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Test Suite Worker REST API

The Test Suite Worker exposes a REST API using the [Wilderness Labs Maple Web Server](https://github.com/WildernessLabs/Meadow.Foundation/tree/main/Source/Meadow.Foundation.Libraries_and_Frameworks/Web.Maple).

A [Postman Collection is available](TestSuite.postman_collection.json) that provides examples of all REST endpoints.

| Path | Verb | Description |
| --- | --- | --- |
| `/` | GET | Gets version information about Test Suite. Intended to be a simple test point to see if the Worker is running. |
| `/time` | GET | Gets the current UTC time of the Meadow running the Worker |
| `/time` | PUT | Sets the current UTC time of the Meadow running the Worker |
| `/assemblies` | GET | Gets a list of all loaded test assemblies |
| `/assemblies/{name}` | PUT | Uploads a test assembly with file name `name` to the configured test assembly folder |
| `/tests` | GET | Gets a list of all loaded tests IDs |
| `/tests/{testID}` | GET | Gets information about the specified Test ID |
| `/tests/{testID}` | POST | Starts a new run of the specified Test ID |
| `/results` | GET | Gets a list of all known Test Results |
| `/results/{guid}` | GET | Gets the results for the specified Result ID |
| `/results/{testID}` | GET | Gets all known results for the specified Test ID |
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ Meadow.TestSuite is intended to provide a remote-controllable test infrastructur

A goal is to provide a API that at least feels like xUnit, or a subset of xUnit, to facilitate easier test creation. Direct use of xUnit, at least right now, is not a goal since the tests must be run on-device and control has to be handled by a meadow-specific transport layer.

[Using a Raspberry Pi as the Test Director](raspi.md)
[Using a Raspberry Pi as the Test Director](doc/raspi.md)

[Running the TestDirector from a Container](deploy/readme.md)

[Hardware Setup](setup.md)
[Hardware Setup](doc/setup.md)

[Using TestSuite](usage.md)
[Using TestSuite](doc/usage.md)

[Authoring TestSuite Tests](authoring-tests.md)
[Authoring TestSuite Tests](doc/authoring-tests.md)

[TestSuite Implementation Details](implementation.md)
[TestSuite Implementation Details](doc/implementation.md)

## Beta Notes

Expand Down

0 comments on commit 821591c

Please sign in to comment.