Update common_libs/test_framework/README.md to close the documentation gaps LLM simulations surfaced:
Exceptions: Document that runBattle() can raise OSError (compilation failure), IOError (runner non-zero exit), TimeoutError (any timeout). Show a try/except example.
parseServerOutput: Document this exported proc from battle_result.nim. Show how to use it for fast offline parser tests without needing Java/server. Include a fixture example.
Compile behavior: Note that compileBots runs on every runBattle() call (no caching). If running multiple tests, each call recompiles. Mention this so users aren't surprised.
Compile timeout: Note the 30s per-bot hardcoded compile timeout (independent of runBattle's timeout param).
Zero-value BotResult trap: Add a note/example showing that searching r.results by name returns a zeroed struct if not found — recommend guarding with check found.name == "MyBot".
Env-var skip pattern: Show a pattern for gracefully skipping tests when TR_SERVER_JAR / TR_BATTLE_RUNNER are not set.
Parent: #135
## Question
Update `common_libs/test_framework/README.md` to close the documentation gaps LLM simulations surfaced:
1. **Exceptions**: Document that `runBattle()` can raise `OSError` (compilation failure), `IOError` (runner non-zero exit), `TimeoutError` (any timeout). Show a try/except example.
2. **`parseServerOutput`**: Document this exported proc from `battle_result.nim`. Show how to use it for fast offline parser tests without needing Java/server. Include a fixture example.
3. **Compile behavior**: Note that `compileBots` runs on every `runBattle()` call (no caching). If running multiple tests, each call recompiles. Mention this so users aren't surprised.
4. **Compile timeout**: Note the 30s per-bot hardcoded compile timeout (independent of `runBattle`'s `timeout` param).
5. **Zero-value BotResult trap**: Add a note/example showing that searching `r.results` by name returns a zeroed struct if not found — recommend guarding with `check found.name == "MyBot"`.
6. **Env-var skip pattern**: Show a pattern for gracefully skipping tests when `TR_SERVER_JAR` / `TR_BATTLE_RUNNER` are not set.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Parent: #135
Question
Update
common_libs/test_framework/README.mdto close the documentation gaps LLM simulations surfaced:runBattle()can raiseOSError(compilation failure),IOError(runner non-zero exit),TimeoutError(any timeout). Show a try/except example.parseServerOutput: Document this exported proc frombattle_result.nim. Show how to use it for fast offline parser tests without needing Java/server. Include a fixture example.compileBotsruns on everyrunBattle()call (no caching). If running multiple tests, each call recompiles. Mention this so users aren't surprised.runBattle'stimeoutparam).r.resultsby name returns a zeroed struct if not found — recommend guarding withcheck found.name == "MyBot".TR_SERVER_JAR/TR_BATTLE_RUNNERare not set.SirStone referenced this issue2026-08-30 15:03:05 +02:00
Done — added exceptions table, parseServerOutput section, compile behavior note, zero-value trap warning, env-var skip pattern, shared adversaries note to README.