{"id":23184455,"url":"https://github.com/abhivaikar/vanillacheck","last_synced_at":"2026-05-01T13:32:11.107Z","repository":{"id":268433986,"uuid":"901200689","full_name":"abhivaikar/vanillacheck","owner":"abhivaikar","description":"A vanilla and simple test runner written in Java for writing automated tests.","archived":false,"fork":false,"pushed_at":"2024-12-10T09:20:11.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-29T16:59:01.655Z","etag":null,"topics":["java","test-automation","unit-testing"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abhivaikar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-12-10T08:17:09.000Z","updated_at":"2024-12-18T06:47:48.000Z","dependencies_parsed_at":"2024-12-16T19:10:03.238Z","dependency_job_id":"5b1b177c-c4e1-48ed-bee2-1238472d6eb4","html_url":"https://github.com/abhivaikar/vanillacheck","commit_stats":null,"previous_names":["abhivaikar/vanillacheck"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/abhivaikar/vanillacheck","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhivaikar%2Fvanillacheck","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhivaikar%2Fvanillacheck/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhivaikar%2Fvanillacheck/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhivaikar%2Fvanillacheck/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abhivaikar","download_url":"https://codeload.github.com/abhivaikar/vanillacheck/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhivaikar%2Fvanillacheck/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32499681,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"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":["java","test-automation","unit-testing"],"created_at":"2024-12-18T09:19:28.421Z","updated_at":"2026-05-01T13:32:11.077Z","avatar_url":"https://github.com/abhivaikar.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# VanillaCheck\n\nHi there! I'm working on this project, **VanillaCheck**, as an exercise to better understand how testing frameworks like JUnit or TestNG are created. This is not meant to compete with those frameworks; it's just a simple and experimental attempt to build something from scratch to learn the core concepts behind test discovery, execution, and reporting.\n\n---\n\n## Why I Created VanillaCheck\n\nI’ve always been fascinated by how popular testing frameworks make writing and running tests so seamless. To understand the inner workings, I decided to create my own basic test runner. The goal is to explore:\n- **How tests are discovered automatically using annotations.**\n- **How hooks like setup and teardown are implemented.**\n- **How results are captured and presented.**\n\nThis project is my way of diving deeper into those concepts and experimenting with a lightweight test runner.\n\n---\n\n## What VanillaCheck Does\n\nVanillaCheck is a minimal test runner that:\n1. Automatically discovers test methods in a class using custom annotations.\n2. Executes tests sequentially with before and after hooks.\n3. Generates test result reports in three formats:\n    - Console output\n    - JSON file\n    - HTML file (styled with Bootstrap)\n\n---\n\n## Features\n\n- **Custom Annotations**:\n    - `@AutoTest`: Marks a method as a test.\n    - `@BeforeAutoTest`: Marks a method to run before each test.\n    - `@AfterAutoTest`: Marks a method to run after each test.\n\n- **Simple Test Execution**:\n    - Tests are discovered and executed in sequence.\n    - Failures in one test don’t stop others from running.\n\n- **Report Generation**:\n    - A clean JSON file summarizing the results.\n    - A Bootstrap-styled HTML report for easy viewing.\n\n---\n\n## How It Works\n\nHere’s a simple example of how to use VanillaCheck:\n\n### Write a Test Class\n```java\npackage com.vanillacheck.tests;\n\nimport com.vanillacheck.annotations.AutoTest;\nimport com.vanillacheck.annotations.BeforeAutoTest;\nimport com.vanillacheck.annotations.AfterAutoTest;\nimport org.assertj.core.api.Assertions;\n\npublic class YourTestClass {\n\n    @BeforeAutoTest\n    public void setup() {\n        System.out.println(\"Before each test\");\n    }\n\n    @AutoTest\n    public void testExamplePass() {\n        Assertions.assertThat(1 + 1).isEqualTo(2);\n    }\n\n    @AutoTest\n    public void testExampleFail() {\n        Assertions.assertThat(1 + 1).isEqualTo(3);\n    }\n\n    @AfterAutoTest\n    public void teardown() {\n        System.out.println(\"After each test\");\n    }\n}\n```\n\n### Run the Tests\nThe `TestRunner` class is responsible for running your tests:\n```java\npublic class TestRunner {\n\n    public static void main(String[] args) {\n        TestRunner runner = new TestRunner();\n        List\u003cTestResult\u003e results = runner.runTests(YourTestClass.class);\n        runner.displayResults(results);\n        runner.writeJsonReport(results, \"test-results.json\");\n        runner.writeHtmlReport(results, \"test-report.html\");\n    }\n}\n```\n\n---\n\n## What You’ll See\n\n### **1. Console Output**\nVanillaCheck prints a summary of the test results in the console:\n```plaintext\n=== Test Summary ===\nTotal tests run: 2\nPassed: 1\nFailed: 1\n====================\n\nDetailed Results:\nTest: testExamplePass | Status: PASS\nTest: testExampleFail | Status: FAIL\nReason: expected:\u003c3\u003e but was:\u003c2\u003e\n```\n\n### **2. JSON Report (`test-results.json`)**\nThe results are also written to a JSON file for structured analysis:\n```json\n[\n    {\n        \"testName\": \"testExamplePass\",\n        \"status\": \"PASS\",\n        \"exceptionMessage\": null,\n        \"executionTime\": 5\n    },\n    {\n        \"testName\": \"testExampleFail\",\n        \"status\": \"FAIL\",\n        \"exceptionMessage\": \"expected:\u003c3\u003e but was:\u003c2\u003e\",\n        \"executionTime\": 7\n    }\n]\n```\n\n### **3. HTML Report (`test-report.html`)**\nThe HTML report provides a visually appealing summary of test results, styled with Bootstrap:\n- **Total tests**, **passed**, and **failed** are displayed in a table.\n- Each test includes its name, status, exception (if any), and execution time.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabhivaikar%2Fvanillacheck","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabhivaikar%2Fvanillacheck","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabhivaikar%2Fvanillacheck/lists"}