{"id":13593216,"url":"https://github.com/Pragmatists/JUnitParams","last_synced_at":"2025-04-09T02:32:51.911Z","repository":{"id":19107376,"uuid":"22336000","full_name":"Pragmatists/JUnitParams","owner":"Pragmatists","description":"Parameterised tests that don't suck","archived":false,"fork":false,"pushed_at":"2023-11-04T01:37:58.000Z","size":703,"stargazers_count":889,"open_issues_count":42,"forks_count":149,"subscribers_count":77,"default_branch":"master","last_synced_at":"2024-08-02T16:46:58.581Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://pragmatists.github.io/JUnitParams","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Pragmatists.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2014-07-28T08:32:38.000Z","updated_at":"2024-08-02T16:46:58.581Z","dependencies_parsed_at":"2024-01-06T16:01:02.937Z","dependency_job_id":null,"html_url":"https://github.com/Pragmatists/JUnitParams","commit_stats":{"total_commits":385,"total_committers":46,"mean_commits":8.369565217391305,"dds":0.5194805194805194,"last_synced_commit":"b8647f177a2be1f37a252ec11687b0ea606b1a70"},"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pragmatists%2FJUnitParams","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pragmatists%2FJUnitParams/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pragmatists%2FJUnitParams/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pragmatists%2FJUnitParams/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pragmatists","download_url":"https://codeload.github.com/Pragmatists/JUnitParams/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223356617,"owners_count":17132172,"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":[],"created_at":"2024-08-01T16:01:17.842Z","updated_at":"2024-11-06T14:31:27.577Z","avatar_url":"https://github.com/Pragmatists.png","language":"HTML","funding_links":[],"categories":["HTML","测试"],"sub_categories":[],"readme":"# JUnitParams\n\n[![Build Status](https://secure.travis-ci.org/Pragmatists/JUnitParams.png)](http://travis-ci.org/Pragmatists/JUnitParams) [![Coverage Status](https://coveralls.io/repos/github/Pragmatists/JUnitParams/badge.svg?branch=coverage)](https://coveralls.io/github/Pragmatists/JUnitParams?branch=master) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/pl.pragmatists/JUnitParams/badge.svg)](https://maven-badges.herokuapp.com/maven-central/pl.pragmatists/JUnitParams)\n\n*Parameterised tests that don't suck*\n\n## Example\n\n``` java\n@RunWith(JUnitParamsRunner.class)\npublic class PersonTest {\n\n  @Test\n  @Parameters({\"17, false\", \n               \"22, true\" })\n  public void personIsAdult(int age, boolean valid) throws Exception {\n    assertThat(new Person(age).isAdult(), is(valid));\n  }\n  \n}\n```\nSee more [examples](https://github.com/Pragmatists/JUnitParams/blob/master/src/test/java/junitparams/usage/SamplesOfUsageTest.java)\n\n\n## Latest News\n\n* 2017-11-03 JUnitParams 1.1.1 released. Check [release info](RELEASES.md).\n\n[more news here](https://github.com/Pragmatists/JUnitParams/wiki)\n\n## About\nJUnitParams project adds a new runner to JUnit and provides much easier and readable parametrised tests for JUnit \u003e= 4.12.\n\nMain differences to standard JUnit Parametrised runner:\n\n* more explicit - params are in test method params, not class fields\n* less code - you don't need a constructor to set up parameters\n* you can mix parametrised with non-parametrised methods in one class\n* params can be passed as a CSV string or from a parameters provider class\n* parameters provider class can have as many parameters providing methods as you want, so that you can group different cases\n* you can have a test method that provides parameters (no external classes or statics anymore)\n* you can see actual parameter values in your IDE (in JUnit's Parametrised it's only consecutive numbers of parameters):\n\n## Quickstart\n\nJUnitParams is available as Maven artifact:\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003epl.pragmatists\u003c/groupId\u003e\n  \u003cartifactId\u003eJUnitParams\u003c/artifactId\u003e\n  \u003cversion\u003e1.1.1\u003c/version\u003e\n  \u003cscope\u003etest\u003c/scope\u003e\n\u003c/dependency\u003e\n```\nTo use JUnitParams in a Gradle build add this to your dependencies:\n\n```groovy\ntestCompile 'pl.pragmatists:JUnitParams:1.1.1'\n```\n\n\nIf you want to see just one simple test class with all main ways to use JUnitParams see here:\nhttps://github.com/Pragmatists/junitparams/tree/master/src/test/java/junitparams/usage\n\nYou can also have a look at [Wiki:Quickstart](https://github.com/Pragmatists/junitparams/wiki/Quickstart)\n\n## Integration with Spring framework\n\nSince **spring version 4.2** it is possible to integrate JUnitParams and spring. More about this [here.](https://github.com/Pragmatists/junitparams-spring-integration-example) \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPragmatists%2FJUnitParams","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FPragmatists%2FJUnitParams","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPragmatists%2FJUnitParams/lists"}