{"id":20365036,"url":"https://github.com/h3ar7b3a7/springboottdd","last_synced_at":"2026-05-17T03:36:48.374Z","repository":{"id":136744857,"uuid":"523877582","full_name":"H3AR7B3A7/SpringBootTDD","owner":"H3AR7B3A7","description":"A simple example of Test Driven Development (TDD) with Spring Boot REST services, JUnit 5 \u0026 Mockito.","archived":false,"fork":false,"pushed_at":"2022-08-13T16:34:53.000Z","size":87,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-29T00:35:21.482Z","etag":null,"topics":["junit5","mockito","rest-api","spring-boot"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"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/H3AR7B3A7.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":"2022-08-11T21:46:51.000Z","updated_at":"2022-08-12T17:02:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"cf1dae3e-e372-4de7-9cc1-d598b79285b3","html_url":"https://github.com/H3AR7B3A7/SpringBootTDD","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/H3AR7B3A7/SpringBootTDD","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/H3AR7B3A7%2FSpringBootTDD","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/H3AR7B3A7%2FSpringBootTDD/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/H3AR7B3A7%2FSpringBootTDD/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/H3AR7B3A7%2FSpringBootTDD/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/H3AR7B3A7","download_url":"https://codeload.github.com/H3AR7B3A7/SpringBootTDD/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/H3AR7B3A7%2FSpringBootTDD/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33126574,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T18:38:32.183Z","status":"online","status_checked_at":"2026-05-17T02:00:05.366Z","response_time":107,"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":["junit5","mockito","rest-api","spring-boot"],"created_at":"2024-11-15T00:15:04.601Z","updated_at":"2026-05-17T03:36:48.342Z","avatar_url":"https://github.com/H3AR7B3A7.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TDD\n\nTest-driven development (TDD) is a software development process relying on software requirements\nbeing converted to test cases before software is fully developed, and tracking all software development\nby repeatedly testing the software against all test cases. This is as opposed to software being developed\nfirst and test cases created later.\nSoftware engineer Kent Beck, who is credited with having developed or \"rediscovered\" the technique,\nstated in 2003 that TDD encourages simple designs and inspires confidence.\n\nTest-driven development is related to the test-first programming concepts of extreme programming,\nbegun in 1999, but more recently has created more general interest in its own right.\n\n## Red - Green - Refactor\n\n- Write test before production code\n- First test must fail (RED)\n- Write simplest code passing the test (GREEN)\n- Refactor\n- Don’t write any test before passing existing ones\n\n![](topdown-bottomup.png)\n\n## Bottom Up\n\nWhen Kent Beck first presented TDD, it was bottom-up. This approach is classissist way.\nThere are no mocks or stubs. Starting with lowest components Red-Green-Refactor cycle runs.\nI think this is more robust way since developer test highest level components such as controllers\nwith exactly working components not with stubs. Another advantage is that several developers\nworking on same code can reuse existing tests.\n\n## Top Down\n\nMockist or **outsidein** or Top-down approach.\nDeveloper starts writing tests for highest level components first and mock dependent objects.\nThat way there happens little test doubles contrary to classissist way therefore decreases refactoring cost.\nAnother advantage is on the integration side. This approach emphasizes integration of higher level components\nprior to development of lower components. Thus, it allows to design your solution better than classisist way.\n\n## BDD\n\nIn software engineering, behavior-driven development (BDD) is an agile software development process that\nencourages collaboration among developers, quality assurance testers, and customer representatives in a\nsoftware project. It encourages teams to use conversation and concrete examples to formalize a shared\nunderstanding of how the application should behave. It emerged from test-driven development (TDD).\nBehavior-driven development combines the general techniques and principles of TDD with ideas from\ndomain-driven design and object-oriented analysis and design to provide software development and\nmanagement teams with shared tools and a shared process to collaborate on software development.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fh3ar7b3a7%2Fspringboottdd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fh3ar7b3a7%2Fspringboottdd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fh3ar7b3a7%2Fspringboottdd/lists"}