writing-tests
Skill by tosun-si
Writes BigTesty test files (*.bigtesty.yaml) that test BigQuery SQL, including queries, scripts, MERGE statements and procedures. It is for developers who want to check BigQuery SQL with given rows, a when step and then assertions.
Install writing-tests
Built from the published package, never by AI.
git clone --depth 1 https://github.com/tosun-si/bigtesty /tmp/bigtesty && mkdir -p ~/.claude/skills && cp -r /tmp/bigtesty/src/bigtesty/plugin/skills/writing-tests ~/.claude/skills/writing-testsRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/tosun-si/bigtesty /tmp/bigtesty && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/bigtesty/src/bigtesty/plugin/skills/writing-tests ~/.gemini/antigravity-cli/skills/writing-testsAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill teaches an assistant how to write BigTesty test files. A test file lists scenarios. Each scenario gets its own datasets, so scenarios run in parallel and do not see each other's data. A scenario loads rows with given, runs the SQL under test with when, and checks results with then, using expected rows, expected files, row_count or Python functions.
The skill sets rules for the test files. It says to reference the production SQL file instead of copying it, to pass query parameters and templates, and to choose assertion options such as ignore_order and key_columns. It also covers generating expected files with bigtesty test --update and checking files with bigtesty validate. It is for developers who test BigQuery SQL with BigTesty.
Written from the project's SKILL.md and checked against it.
What it can do
- Scenario structureWrites scenarios with given rows, a when step and then assertions in a *.bigtesty.yaml file.
- Production SQL referencePoints when and then steps at the production SQL file instead of a copied query.
- Query parametersSets @name query parameters with inferred or explicit types on a scenario, step or assertion.
- Template renderingPasses scenario vars to the team's own rendering function declared in bigtesty.yaml.
- Typed assertionsCompares expected rows against the result schema, with options for order, columns and float tolerance.
- Custom Python checksAdds Python assertion functions for checks that expected rows cannot express.
- Expected file generationUses bigtesty test --update or pytest --bigtesty-update to create or rewrite expected files.
- Validation and selectionRuns bigtesty validate and selects scenarios with bigtesty test -k.
What you need
- BigTesty
- BigQuery
- Python
Try asking
- Write a bigtesty scenario that tests my MERGE with given rows and expected rows.
- Add a BigTesty scenario for the empty input and null edge cases of this query.
- Review my bigtesty.yaml test file and explain what each then assertion checks.
Good to know
- BigTesty does not render templates itself; the team's own rendering function must be declared.
- Query jobs are billed, at least 10 MiB each; load jobs are free.
- --update makes the current result the expected one, so the written rows must be checked against the business rule.
- Do not alias a table with the name of a configured dataset, because it would be rewritten.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: src/bigtesty/plugin/skills/writing-tests/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to writing-tests
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
writing-tests: common questions
Does BigTesty copy my production SQL into the tests?
No. The skill says to reference the production SQL file in when.sql_file or query_file, and the dataset references are rewritten to the scenario datasets.
How do I create expected files without writing them by hand?
Write the then block with an expected_file that does not exist yet, then run bigtesty test --update or pytest --bigtesty-update. Check the written rows before committing them.
Can BigTesty test a query with Jinja or Airflow templates?
Yes, through a renderer. The skill says to declare a render function in bigtesty.yaml that calls the production rendering code, and to pass vars per scenario.
How do I install writing-tests?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is writing-tests free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is writing-tests safe to use?
It scores 67 of 100. Grades: maintenance A, licence A, quality B. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to writing-tests?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
