Cli E2e Testcase Writer logo

Cli E2e Testcase Writer

OrganizationPopular
larksuite
cli-e2e-testcase-writer

Use when adding or updating Go CLI E2E coverage for one `tests/cli_e2e/{domain}` domain of the compiled `lark-cli`, especially when the work requires live `--help` or `schema` exploration, scenario-based `clie2e.RunCmd` workflows, and per-domain `coverage.md` maintenance.

Overview

Publisherlarksuite
Repositorycli
Skill namecli-e2e-testcase-writer
Stars
17.3K
Forks
1.4K
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by larksuite on GitHub. Read the source before you install it.

Installation

Install the Cli E2e Testcase Writer AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/larksuite/cli.git /tmp/cli
mkdir -p .claude/skills
cp -r /tmp/cli/tests/cli_e2e/cli-e2e-testcase-writer .claude/skills/cli-e2e-testcase-writer
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Cli E2e Testcase Writer in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Cli E2e Testcase Writer on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Cli E2e Testcase Writer is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

CLI E2E Testcase Writer

Work on one domain per run. Produce exactly two artifacts for that domain:

  • workflow testcase files under tests/cli_e2e/{domain}/
  • tests/cli_e2e/{domain}/coverage.md

Focus on domain testcase files. Do not change shared E2E support code such as tests/cli_e2e/core.go unless the user explicitly asks. Treat tests/cli_e2e/demo/ as reference only.

Core standard

  • Make the testcase scenario-based and self-contained.
  • Prove one workflow end to end: create plus follow-up read, or mutate plus teardown.
  • Prefer one file per workflow or one closely related feature.
  • For mutable flows, prove persisted state with read-after-write assertions, not just exit code.
  • Leave prerequisite-heavy paths uncovered when they cannot be proven, and explain why in coverage.md.

Workflow

1. Explore the live CLI before writing code

bash
lark-cli --help
lark-cli <domain> --help
lark-cli <domain> +<shortcut> -h
lark-cli <domain> <group> --help
lark-cli <domain> <group> <method> -h
lark-cli schema <domain>.<group>.<method>

2. Count leaf commands for the denominator

  • A leaf command is one that executes an action — it has no further subcommands.
  • If lark-cli <domain> <group> --help lists no subcommands, <group> itself is the leaf.
  • Count task +create as one leaf and task tasks get as one leaf.
  • Do not count parameter combinations.
  • Reuse coverage already present under tests/cli_e2e/{domain}/. Do not count tests/cli_e2e/demo/.

3. Choose the proof surface before editing

Identify the provable risks for the touched workflow: invalid input, missing prerequisite, identity or permission, state transition, output shape, cleanup safety. If only the happy path is testable, document the blocked risk areas in coverage.md.

4. Add or update the workflow testcase

  • Use clie2e.RunCmd(ctx, clie2e.Request{...}).
  • Put command path and plain flags in Args; put JSON in Params (URL/path parameters) and Data (request body).
  • Prefer one top-level test per workflow with t.Run substeps.
  • Register teardown on parentT.Cleanup so it survives subtest failures.
  • When touching an existing command, verify the JSON response shape is stable: assert status type, field paths, and identifiers consumed by later steps before changing assertions.

5. Run and iterate

Run go test ./tests/cli_e2e/{domain} -count=1 while iterating and before finishing. If command shape or behavior is unclear, re-check help or schema (step 1) before changing assertions.

6. Refresh the domain outputs

  • Update the workflow testcase files.
  • Update coverage.md: recompute the denominator from live help output, mark each command as shortcut or api, and keep one command table for the whole domain.

Testcase rules

  • Override BinaryPath, DefaultAs, or Format on clie2e.Request only when the testcase truly needs it.
  • Use require.NoError, result.AssertExitCode, result.AssertStdoutStatus, assert, and gjson.
  • Shortcut responses ({ok: bool}) assert true; API responses ({code: int}) assert 0.
  • Use t.Helper() only for setup or assertion helpers that are called from multiple tests.
  • Use table-driven tests only when the scenario shape repeats across inputs.
  • For expected failures, assert stderr content and exit code when the environment makes them deterministic.
  • If identity or external fixtures cannot be proven, leave the command uncovered and document the prerequisite rather than faking confidence.

coverage.md

Keep coverage.md brief and mechanical. Include:

  • a domain-specific H1 title
  • a metrics section with denominator, covered count, and coverage rate
  • a summary section restating each Test... workflow, key t.Run(...) proof points, and main blockers
  • one command table for all commands

Recommended structure:

markdown
# <Domain> CLI E2E Coverage

## Metrics
- Denominator: N leaf commands
- Covered: N
- Coverage: N%

## Summary
- TestXxx: ... key `t.Run(...)` proof points ...
- Blocked area: ...

## Command Table
| Status | Cmd | Type | Testcase | Key parameter shapes | Notes / uncovered reason |
| --- | --- | --- | --- | --- | --- |
|| task +create | shortcut | task_status_workflow_test.go::TestTask_StatusWorkflow | basic create; create with due | |
|| task +assign | shortcut |  | none | requires real user open_id |
  • Mark each command shortcut or api.
  • Write testcase entries in go test -run friendly form.
  • Commands only exercised in parentT.Cleanup teardown are not counted as covered.
  • Do not split covered and uncovered commands into separate sections.

Guardrails

  • Run as bot identity only; do not assume --as user works.
  • Do not place new real coverage under tests/cli_e2e/demo/.
  • Do not depend on preexisting remote data.
  • Do not fabricate open_ids, chats, docs, or other remote fixtures.
  • Prefer deterministic negative cases over tenant-dependent assertions.
  • Do not guess Params or Data fields when help or schema can tell you the exact shape.
  • Do not hardcode obvious defaults unless the command truly requires explicit flags.
  • Do not put agent, model, or vendor brand names in visible remote test data; use neutral prefixes such as lark-cli-e2e- or <domain>-e2e-.
  • A command is covered only when the testcase asserts returned fields or persisted state, not just exit code.
  • Cleanup-only execution is not primary coverage, except delete in the same workflow that created the resource.

Frequently asked questions

What does the Cli E2e Testcase Writer AI skill do?

Use when adding or updating Go CLI E2E coverage for one `tests/cli_e2e/{domain}` domain of the compiled `lark-cli`, especially when the work requires live `--help` or `schema` exploration, scenario-based `clie2e.RunCmd` workflows, and per-domain `coverage.md` maintenance.

Why use Cli E2e Testcase Writer on TypingMind?

Because you install it once and use it with any model. Cli E2e Testcase Writer is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Cli E2e Testcase Writer in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/larksuite/cli/tree/main/tests/cli_e2e/cli-e2e-testcase-writer. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Cli E2e Testcase Writer?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Cli E2e Testcase Writer?

As many as you like. As long as a model supports skills, you can use Cli E2e Testcase Writer with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Cli E2e Testcase Writer AI skill free?

Yes. It is published on GitHub by larksuite under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇