parameterized-tests
Skill1.5k starsChanged 2 months agoMITView on GitHub
Use when writing, converting, or reviewing parameterized JVM, Robolectric, instrumentation, or Paparazzi tests in stripe-android. Covers TestParameterInjector runners, source-set dependencies, method versus class parameters, value providers, case matrices, and stable test names.
1 other project uses a version of this.
Trending
Quiet this year.thin dataabout the whole repository
Most recently taken up by
- dceoy/ai-coding-agent-skillstheir own version, first seen Sep 6, 2026
Who's talking about stripe/stripe-android
- stripe/stripe-ios“Port Stripe-iOS to Flutter”GitHub · Jan 31, 2019 · 64 reactions
- Adyen/adyen-web“Google Pay - Issue with Maestro - regression from #3539”GitHub · Nov 5, 2025 · 6 reactions
- facebook/facebook-android-sdk“Robolectric is incorrectly specified as non-test dependencies”GitHub · Oct 6, 2022 · 5 reactions
- thebergamo/react-native-fbsdk-next“Upgrade bouncycastle to org.bouncycastle:bcprov-jdk15to18:1.70”GitHub · Oct 5, 2022 · 3 reactions
- PhilipsHue/flutter_reactive_ble“Include our own proguard rules to simplify usages of our library ”GitHub · Nov 18, 2020 · 3 reactions
The biggest 5 of 6 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 6
Talked about on GitHub (6 times).
On GitHub · 6
- Jan 31, 2019Port Stripe-iOS to Flutter — stripe/stripe-ios64 reactions · 8 comments
- Nov 5, 2025Google Pay - Issue with Maestro - regression from #3539 — Adyen/adyen-web6 reactions · 8 comments
- Oct 6, 2022Robolectric is incorrectly specified as non-test dependencies — facebook/facebook-android-sdk5 reactions · 2 comments
- Oct 5, 2022Upgrade bouncycastle to org.bouncycastle:bcprov-jdk15to18:1.70 — thebergamo/react-native-fbsdk-next3 reactions · 6 comments
- Nov 18, 2020Include our own proguard rules to simplify usages of our library — PhilipsHue/flutter_reactive_ble3 reactions
1 more on GitHub
- Feb 10, 2023Opt certain crash reports not to affect crashlytics dashboard — firebase/firebase-android-sdk2 reactions · 1 comment
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- dceoy/ai-coding-agent-skills★ 4same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository8 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- compose-testsSkill
- delegate-low-reasoning-workSkill
- fixing-flakesSkill
- network-testsSkill
- screenshot-testsSkill
- write-unit-testsSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 6 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use TestParameterInjector to give each case an independent test result while keeping repeated behavior in one test method.
- Distinctive: line 19
Use only the declaration needed by that source set.
- Very specific: line 34
Import RobolectricTestParameterInjector from org.robolectric.
- Distinctive: line 50
Use a class field or constructor parameter only when every test in the class intentionally shares that parameter matrix.
- Distinctive: line 54
Use enum and boolean shorthand when every value is meaningful:
- Very specific: line 66
Use one curated case object when only specific combinations are valid or when inputs and expected outputs belong together.
- Very specific: line 68
Use the modern TestParameterValuesProvider, not the deprecated nested provider interface:
- Distinctive: line 93
Run the focused parameterized test class and confirm the expected case count and names.
- Distinctive: line 94
Run the module's required static and API checks.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Parameterized Tests
Use TestParameterInjector to give each case an independent test result while keeping repeated behavior in one test method.
Select the runner and dependency
Declare TestParameterInjector directly in the module and source set that compiles the test:
testImplementation testLibs.testParameterInjector
androidTestImplementation testLibs.testParameterInjectorUse only the declaration needed by that source set. Do not rely on another module or source set to provide it transitively.
| Test type | Runner |
| JVM, instrumentation, or Paparazzi | TestParameterInjector |
| Robolectric JVM | RobolectricTestParameterInjector |
@RunWith(TestParameterInjector::class)
internal class FeeCalculatorTest
@RunWith(RobolectricTestParameterInjector::class)
internal class FeeCalculatorRobolectricTestImport RobolectricTestParameterInjector from org.robolectric. Import the other runner and annotations from com.google.testing.junit.testparameterinjector.
Put focused cases on the test method
Parameterize the method when the cases apply to one test. This keeps unrelated tests from running across the same matrix.
@Test
fun `calculates the expected fee`(
@TestParameter(valuesProvider = FeeCaseProvider::class)
testCase: FeeCase,
) {
assertThat(calculateFee(testCase.input)).isEqualTo(testCase.expected)
}Use a class field or constructor parameter only when every test in the class intentionally shares that parameter matrix.
Choose the smallest value source
Use enum and boolean shorthand when every value is meaningful:
@Test
fun `updates state`(
@TestParameter mode: Mode,
@TestParameter enabled: Boolean,
) {
// Runs the Cartesian product of every mode and boolean value.
}Use one curated case object when only specific combinations are valid or when inputs and expected outputs belong together. Multiple @TestParameter arguments produce a Cartesian product.
Use the modern TestParameterValuesProvider, not the deprecated nested provider interface:
internal object FeeCaseProvider : TestParameterValuesProvider() {
override fun provideValues(
context: TestParameterValuesProvider.Context?,
): List<FeeCase> = listOf(
FeeCase(name = "Standard", input = 100, expected = 3),
FeeCase(name = "Expedited", input = 100, expected = 8),
)
}
internal data class FeeCase(
val name: String,
val input: Int,
val expected: Int,
) {
override fun toString(): String = name
}Give curated cases stable, readable names. Override toString() when the framework should derive test identifiers from the case.
Check the result
- Run the focused parameterized test class and confirm the expected case count and names.
- Run the module's required static and API checks.
- Run
git diff --check.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

