running-test-libmongoc
Skill by mongodb
Explains how to build, filter, and debug tests in the test-libmongoc executable of the MongoDB C Driver. Covers its custom TestSuite flags (-l, -d, -f), test naming, tags, and running through CTest. Written for contributors working on libmongoc and libbson tests.
Install running-test-libmongoc
Built from the published package, never by AI.
git clone --depth 1 https://github.com/mongodb/mongo-c-driver /tmp/mongo-c-driver && mkdir -p ~/.claude/skills && cp -r /tmp/mongo-c-driver/.agents/skills/running-test-libmongoc ~/.claude/skills/running-test-libmongocRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/mongodb/mongo-c-driver /tmp/mongo-c-driver && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/mongo-c-driver/.agents/skills/running-test-libmongoc ~/.gemini/antigravity-cli/skills/running-test-libmongocAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install running-test-libmongoc in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill explains how to run, filter, and debug tests in test-libmongoc, the executable that holds most libmongoc and libbson tests in the MongoDB C Driver. The executable uses a custom framework defined in TestSuite.h rather than a mainstream one, so its flags and name-matching rules differ from common tools. The skill covers building the target, running tests through CTest or directly, and the -l, -d, and -f flags.
It also explains how test names are formed from registration strings and JSON spec file paths, and how bracketed tags map to CTest labels, resource locks, fixtures, and timeouts. It lists common mistakes, such as misusing wildcards or reading a CTest timeout as a failure. It is aimed at developers and contributors who work on the driver's tests.
Written from the project's SKILL.md and checked against it.
What it can do
- Build the test targetBuilds test-libmongoc with a CMake target, since it is not part of the default ALL target.
- Run tests through CTestLists and runs each case as a mongoc/<case-name> CTest test, with parallelism and output on failure.
- Run a single case directlyRuns the executable with -l to select one test by name, with -d debug output and -f to abort on first error.
- Find exact test namesUses test-libmongoc --list-tests to print registered test names for use with -l.
- Map tags to CTest propertiesTurns tags into CTest labels, resource locks, fixture requirements, and timeouts.
- Explain name matching rulesDescribes exact matching for -l, prefix matching with a trailing *, and why tags are not part of names.
What you need
- CMake, to configure and build the test-libmongoc target
- CTest, to run tests through the build directory
- A live MongoDB server for tests tagged live-server or registered with TestSuite_AddLive
Try asking
- How do I run only the /crud/unified/aggregate test in test-libmongoc?
- Why is my test-libmongoc case failing with a 10-second CTest timeout?
- List the CTest tests matching server_selection in the C driver build.
Good to know
- A trailing * is the only wildcard; leading or interior wildcards do not work with -l.
- test-libmongoc is not built by the default ALL target and must be built separately.
- Test cases without a timeout: tag are stopped by CTest after 10 seconds.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: .agents/skills/running-test-libmongoc/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md7 KB
Alternatives to running-test-libmongoc
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
running-test-libmongoc: common questions
How do I run one libmongoc test case directly?
Pass its full name to the executable with -l, for example -l "/crud/unified/aggregate", without a trailing * and without any [...] tag. Add -d to see debug output if the test hangs.
Does the -l flag support wildcards in test names?
Only a trailing * is supported, and it makes a prefix match that can also select sibling tests. A leading or interior * is not supported.
Why does a slow test get killed in CTest?
Cases without a timeout: tag get a 10-second CTest timeout. Confirm by running that case directly, and add a timeout tag if the test needs longer.
How do I install running-test-libmongoc?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is running-test-libmongoc free?
The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.
Is running-test-libmongoc safe to use?
It scores 80 of 100. Grades: maintenance A, licence A, quality A. 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 running-test-libmongoc?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
