{"id":15435229,"url":"https://github.com/drptbl/admiral2","last_synced_at":"2025-10-15T03:19:51.174Z","repository":{"id":88033366,"uuid":"69367809","full_name":"drptbl/admiral2","owner":"drptbl","description":"Beautiful dashboards for visualizing functional test results.","archived":false,"fork":false,"pushed_at":"2016-08-25T16:53:09.000Z","size":62,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-09T23:35:48.803Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/drptbl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-09-27T14:53:38.000Z","updated_at":"2020-10-26T17:27:15.000Z","dependencies_parsed_at":"2023-03-13T18:32:27.951Z","dependency_job_id":null,"html_url":"https://github.com/drptbl/admiral2","commit_stats":{"total_commits":17,"total_committers":3,"mean_commits":5.666666666666667,"dds":"0.17647058823529416","last_synced_commit":"fe4d62a0464eafd60e661c2c4c69073ff1d27a7f"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/drptbl/admiral2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drptbl%2Fadmiral2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drptbl%2Fadmiral2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drptbl%2Fadmiral2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drptbl%2Fadmiral2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/drptbl","download_url":"https://codeload.github.com/drptbl/admiral2/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drptbl%2Fadmiral2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279042499,"owners_count":26091262,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-15T02:00:07.814Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-01T18:43:09.288Z","updated_at":"2025-10-15T03:19:51.104Z","avatar_url":"https://github.com/drptbl.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# admiral2\nBeautiful dashboards for visualizing functional test results.\n\n## Install\n\n```\n% npm install\n% meteor update\n```\n\n## Run\n\n```\n% meteor\n```\n\n## Running with docker\n\nFirst [install docker](https://docs.docker.com/engine/installation/). Then to start mongo DB in one container and admiral2 in another:\n\n```\n% docker-compose up\n```\n\nTo shut that down:\n\n```\n% docker-compose down\n```\n\n## Terminonology\n\n|Term|Definition|\n|---|---|\n|Project|A project to be tested.|\n|Phase|The phase of development associated with a project. For example; `pr-verify` or `nightly-build`|\n|Test Run|The run of a suite of tests. Probably triggered by a new PR, or on a cron job.|\n|Test Result|The result of a single test. A test run will contain multiple test results.|\n|Step|There are multiple steps in a test run. For example; git clone, npm install, build, npm test, etc.|\n|Metric|A metric is a keyed numeric value associated with a test run. It can be anything you want, for example, the length of time to `npm install` or the `average number of retry attempts`.|\n\n## API\n\n|Name|METHOD|Params|Returns|Description|\n|---|---|---|---|---|\n|`/api/project`|GET||JSON Array|Gets the list of projects|\n|`/api/project/:project`|POST|JSON Object with additional project data|JSON Object|Adds a new project. POST'ing to this multiple times will *not* create multiple projects of the same name. The same project will be returned each time.|\n|`/api/project/:project`|GET||JSON Object|Gets the info on an existing project|\n|`/api/project/:project/:phase`|POST||JSON Object|Adds a new project phase. POST'ing to this multiple times will *not* create multiple project phases of the same name. The same project phase will be returned each time.|\n|`/api/project/:project/:phase`|GET||JSON Object|Gets the info on an existing phase of a project|\n|`/api/project/:project/:phase/run`|POST|JSON object with additional data for the test run|JSON Object|Starts a new test run. The result includes the `_id` that you should use for subsequent calls.|\n|`/api/project/:project/:phase/run/:run`|PUT|Additional run data|JSON Object|Updates the run with additional data|\n|`/api/project/:project/:phase/run/:run/step?step=:step`|POST||JSON Object|Sets the current step of the run|\n|`/api/project/:project/:phase/run/:run/metric?metric=:metric\u0026value=:value`|POST||JSON Object|Updates the test run with any metric value you want.|\n|`/api/result/:run`|POST|JSON Object with Test Results|JSON Object|Adds a test result to the test run. Tests are keyed by the `test` key which is a string. If you POST twice with the same `test` to the same `run` it will update the results object.|\n\n## API Usage\n\nThe sections that follow discuss the usual API workflows and how the API works in those scenarios.\n\n### Creating a project\n\nTo track test results in Admiral 2 you need to associate them with a `project`, `project phase`, and `test run`. This is the hierarchy:\n\n`project` -\u003e `project phase` -\u003e `test run` -\u003e `test result`\n\nSo to start collection results you have to first create the `project`, then the `project phase`, and finally start a `test run`.\n\nTo create a project POST to `/api/project/\u003cproject name\u003e`. You can leave the body of the post empty, or you can associate as much data as you like with the project by encoding a JSON object in the body of the request. Shown below is an example `curl`\n command:\n\n```\n% curl -H \"Content-Type: application/json\" -X POST http://admiral:3000/api/project/foo\n```\n\nThis will create a new project named `foo`.\n\nIf you want to associate some data with the project do something like this:\n\n```\n% curl -H \"Content-Type: application/json\" -X POST -d '{\"name\": \"The Foo Project\"}' http://admiral:3000/api/project/foo\n```\n\nThis adds a custom key called `name` to the project with the value `The Foo Project`.\n\nIf you want you can associate `steps` with a project, more on what steps are and why they are important below.\n\nIt's important to note that you can POST to `/api/project/:project` over and over again and it will not create a new project each time. It will only create a project the first time, after that it updates the project, the same way as a PUT.\n\n### Steps and why they are important\n\nRunning tests against a project usually requires some setup before the tests can be run. This includes things like pulling down the code, compiling or building, running unit tests and so on. The term we have given these discrete units of work is `steps`, and the `steps` required to setup and test a project are defined at the `project` level in a JSON array called `steps`.\n\nAn example of steps would be something like:\n\n```\n{\n  steps: [\n    {id: \"git\", name: \"Git Pull\"},\n    {id: \"npm-install\", name: \"npm install\"},\n    {id: \"npm-build\", name: \"npm build\"},\n    {id: \"start\", name: \"test start\"},\n    {id: \"end\", name: \"test end\"}\n  ]\n}\n```\n\nThis would be sent in the `POST` body of the REST call to `/api/projects/\u003cproject name\u003e` and then referred to by id in the subsequent calls to `/api/project/:project/:phase/run/:run/step` which is where the test system can indicate what step is currently being run.\n\n### Creating a project phase\n\nEvery project has multiple project `phases`. Example phases are `pr-verify` or `nightly`. These indicate the various phases of product development that are associated with the tests, and you make have different policies for the impact of a test failure on the `nightly build` versus the a `PR verify`. So that's why we separate those results in the hierarchy.\n\nTo create a project phase POST to `/api/project/\u003cproject name\u003e/\u003cproject phase\u003e`.\n\nJust like the `/api/project/\u003cproject name\u003e` API you can POST to this multiple times but it will only create the phase the first time.\n\nHere is an example CURL to this API:\n\n```\n% curl -H \"Content-Type: application/json\" -X POST http://admiral:3000/api/project/foo/pr-verify\n```\n\nThis creates a `pr-verify` phase on the `foo` project.\n\n## Licenses\n\nAll code not otherwise specified is Copyright Wal-Mart Stores, Inc.\nReleased under the [MIT](./LICENSE) License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrptbl%2Fadmiral2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrptbl%2Fadmiral2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrptbl%2Fadmiral2/lists"}