{"id":24617737,"url":"https://github.com/jacoblincool/testcase-run","last_synced_at":"2025-03-18T21:27:10.044Z","repository":{"id":45591460,"uuid":"422652825","full_name":"JacobLinCool/testcase-run","owner":"JacobLinCool","description":"Testcase Runner","archived":false,"fork":false,"pushed_at":"2023-12-15T17:54:52.000Z","size":195,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-25T02:18:50.766Z","etag":null,"topics":["testcase","testcase-runner"],"latest_commit_sha":null,"homepage":"https://jacoblincool.github.io/testcase-run/","language":"JavaScript","has_issues":true,"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/JacobLinCool.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}},"created_at":"2021-10-29T17:02:03.000Z","updated_at":"2021-11-16T13:29:14.000Z","dependencies_parsed_at":"2022-08-27T14:25:57.362Z","dependency_job_id":null,"html_url":"https://github.com/JacobLinCool/testcase-run","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JacobLinCool%2Ftestcase-run","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JacobLinCool%2Ftestcase-run/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JacobLinCool%2Ftestcase-run/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JacobLinCool%2Ftestcase-run/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JacobLinCool","download_url":"https://codeload.github.com/JacobLinCool/testcase-run/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244246434,"owners_count":20422450,"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","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":["testcase","testcase-runner"],"created_at":"2025-01-24T23:40:22.525Z","updated_at":"2025-03-18T21:27:10.015Z","avatar_url":"https://github.com/JacobLinCool.png","language":"JavaScript","readme":"# Testcase Runner\n\nRun testcases generated by [**testcase-gen**](https://github.com/JacobLinCool/testcase-gen) and collect stdout and execution time of your code.\n\n [![NPM](https://img.shields.io/npm/v/testcase-run.svg?style=flat)](https://www.npmjs.com/package/testcase-run)\n\n## Something You Should Know\n\nThis tool comes with [**testcase-gen**](https://github.com/JacobLinCool/testcase-gen).\n\nIt works with testcases that generated by **testcase-gen**.\n\nBut of course, you can use it without **testcase-gen** by generating same-structure testcases manually.\n\n## How to Use\n\n### 1. Install\n\n```bash\nnpm i testcase-run\n```\n\n### 2. Run your code\n\n```javascript\nconst { Runner } = require(\"testcase-run\");\nconst fs = require(\"fs\");\nconst path = require(\"path\");\n\nconst testcases = fs.readFileSync(path.join(__dirname, \"testcases.json\"), \"utf-8\");\nconst runner = new Runner(testcases);\n\nrunner.run(\"D:\\\\sum.exe\", { timeout: 10_000, core: 2 }).then((report) =\u003e {\n    fs.writeFileSync(path.join(__dirname, \"report.json\"), JSON.stringify(report, null, 2), \"utf-8\");\n    console.log(`runned ${report.reduce((acc, cur) =\u003e acc + cur.results.length, 0)} testcases`);\n});\n```\n\n## CLI Tool\n\n### Install CLI\n\n```bash\nnpm i -g testcase-run\n```\n\n### Use CLI\n\n```bash\ntestcase-run --executable [executable path] --testcase [testcase path] --output [output path] --timeout [timeout] --core [core number]\n        --executable (-e): Executable File Path.\n        --testcase (-t): Testcase File Path.\n        --output (-o): Output (Report) File Path.\n        --timeout (-ti): Timeout (ms).\n        --core (-c): Core Number.\n        --version (-V) or (-v): Show version and help.\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacoblincool%2Ftestcase-run","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjacoblincool%2Ftestcase-run","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacoblincool%2Ftestcase-run/lists"}