{"id":29655866,"url":"https://github.com/henryssondaniel/teacup-java-example-junit","last_synced_at":"2025-07-22T08:07:04.375Z","repository":{"id":293001766,"uuid":"167547011","full_name":"HenryssonDaniel/teacup-java-example-junit","owner":"HenryssonDaniel","description":"Example Teacup project with JUnit engine","archived":false,"fork":false,"pushed_at":"2019-11-24T12:05:06.000Z","size":123,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-13T07:49:33.725Z","etag":null,"topics":["example","http","http-client","http-request","http-response","http-server","https","junit","junit5","protocol","protocol-tester","protocol-tests","teacup","test","test-framework","testing","testing-framework","testing-library","testing-tool","testing-tools"],"latest_commit_sha":null,"homepage":"https://henryssondaniel.github.io/teacup.github.io/","language":"Java","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/HenryssonDaniel.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,"zenodo":null}},"created_at":"2019-01-25T12:52:03.000Z","updated_at":"2019-11-24T12:05:08.000Z","dependencies_parsed_at":"2025-05-13T07:49:39.248Z","dependency_job_id":"6b406717-66f4-4d60-85ac-a576d0ee7a47","html_url":"https://github.com/HenryssonDaniel/teacup-java-example-junit","commit_stats":null,"previous_names":["henryssondaniel/teacup-java-example-junit"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/HenryssonDaniel/teacup-java-example-junit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HenryssonDaniel%2Fteacup-java-example-junit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HenryssonDaniel%2Fteacup-java-example-junit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HenryssonDaniel%2Fteacup-java-example-junit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HenryssonDaniel%2Fteacup-java-example-junit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HenryssonDaniel","download_url":"https://codeload.github.com/HenryssonDaniel/teacup-java-example-junit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HenryssonDaniel%2Fteacup-java-example-junit/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266455371,"owners_count":23931360,"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-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":["example","http","http-client","http-request","http-response","http-server","https","junit","junit5","protocol","protocol-tester","protocol-tests","teacup","test","test-framework","testing","testing-framework","testing-library","testing-tool","testing-tools"],"created_at":"2025-07-22T08:07:03.608Z","updated_at":"2025-07-22T08:07:04.359Z","avatar_url":"https://github.com/HenryssonDaniel.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [User Guide](https://henryssondaniel.github.io/teacup.github.io/)\n[![Build Status](https://travis-ci.com/HenryssonDaniel/teacup-java-example-junit.svg?branch=master)](https://travis-ci.com/HenryssonDaniel/teacup-java-example-junit)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=HenryssonDaniel_teacup-java-example-junit\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=HenryssonDaniel_teacup-java-example-junit)\n## What ##\nThis repository contains examples using the JUnit test engine.\n## Why ##\nIt can be used as a reference to set up and write your first test case.\n## How ##\n### Add the dependencies ###\nIt has three dependencies:\n1. Core (io.github.henryssondaniel.teacup:core)\n1. JUnit test engine (io.github.henryssondaniel.teacup.engine:junit)\n1. HTTP protocol (io.github.henryssondaniel.teacup.protocol:http)\n### Add the test engine ###\n1. Create a file named io.github.henryssondaniel.junit.platform.engine.TestEngine in src/main/resources/META-INF/services\n1. Add the content io.github.henryssondaniel.teacup.engine.junit.TeacupTestEngine\n1. Add the engine to the build file, this is different depending on the build tool you are using.  \nThe best thing is to check: https://junit.org/junit5/docs/current/user-guide/#running-tests-build\n### Write your test (pseudocode) ###\nWriting your test can be divided into three steps:\n1. response = client.send(request) // send the request\n2. node = responseBuilder.setStatusCode(statusCode).setVersion(version).build() // define the assertions\n3. node.verify(response) // verify\n\nAll assertions can be chained and all setters take an assertion rather than a value.  \nThis means that statusCode and version represents assertions as well. The code could look similar to this:  \nstatusCode = integerBuilder.isLessThan(300).isGreaterThanOrEqualTo(200).build()  \nversion = versionBuilder.isSameAs(Version.2).build()","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhenryssondaniel%2Fteacup-java-example-junit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhenryssondaniel%2Fteacup-java-example-junit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhenryssondaniel%2Fteacup-java-example-junit/lists"}