agentleFS
StripeKnown publisherstripe/stripe-android/.agents/skills/parameterized-tests/SKILL.md

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

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 0 mentionsSep 2026: 0 mentionsOct 2026: 0 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the stripe/stripe-android repository that our weekly crawl found: only 6 in all, so this is a hint, not a trend. There is no adoption data for this file yet.

Most recently taken up by

Who's talking about stripe/stripe-android

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

1 more on GitHub
  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    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.

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
  1. Distinctive:

    Use TestParameterInjector to give each case an independent test result while keeping repeated behavior in one test method.

    line 8
  2. Distinctive:

    Use only the declaration needed by that source set.

    line 19
  3. Very specific:

    Import RobolectricTestParameterInjector from org.robolectric.

    line 34
  4. Distinctive:

    Use a class field or constructor parameter only when every test in the class intentionally shares that parameter matrix.

    line 50
  5. Distinctive:

    Use enum and boolean shorthand when every value is meaningful:

    line 54
  6. Very specific:

    Use one curated case object when only specific combinations are valid or when inputs and expected outputs belong together.

    line 66
  7. Very specific:

    Use the modern TestParameterValuesProvider, not the deprecated nested provider interface:

    line 68
  8. Distinctive:

    Run the focused parameterized test class and confirm the expected case count and names.

    line 93
  9. Distinctive:

    Run the module's required static and API checks.

    line 94

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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.testParameterInjector

Use only the declaration needed by that source set. Do not rely on another module or source set to provide it transitively.

Test typeRunner
JVM, instrumentation, or PaparazziTestParameterInjector
Robolectric JVMRobolectricTestParameterInjector
@RunWith(TestParameterInjector::class)
internal class FeeCalculatorTest

@RunWith(RobolectricTestParameterInjector::class)
internal class FeeCalculatorRobolectricTest

Import 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

  1. Run the focused parameterized test class and confirm the expected case count and names.
  2. Run the module's required static and API checks.
  3. Run git diff --check.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.