{"id":13804135,"url":"https://gitlab.com/AntonMeep/silly","last_synced_at":"2025-05-13T17:31:28.856Z","repository":{"id":57999348,"uuid":"7557217","full_name":"AntonMeep/silly","owner":"AntonMeep","description":"Better test runner for the D programming language. No nonsense.","archived":false,"fork":false,"pushed_at":null,"size":null,"stargazers_count":13,"open_issues_count":11,"forks_count":6,"subscribers_count":null,"default_branch":"master","last_synced_at":"2024-08-05T01:10:56.734Z","etag":null,"topics":["TDD","bdd","dlang","dub","no-nonsense","test","test runner"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"0bsd","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://gitlab.com/uploads/-/system/project/avatar/7557217/logo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-19T18:56:18.675Z","updated_at":"2022-08-28T11:25:04.244Z","dependencies_parsed_at":"2022-09-02T14:52:32.003Z","dependency_job_id":null,"html_url":"https://gitlab.com/AntonMeep/silly","commit_stats":null,"previous_names":[],"tags_count":26,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repositories/AntonMeep%2Fsilly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repositories/AntonMeep%2Fsilly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repositories/AntonMeep%2Fsilly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repositories/AntonMeep%2Fsilly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/owners/AntonMeep","download_url":"https://gitlab.com/AntonMeep/silly/-/archive/master/silly-master.zip","host":{"name":"gitlab.com","url":"https://gitlab.com","kind":"gitlab","repositories_count":4515906,"owners_count":6543,"icon_url":"https://github.com/gitlab.png","version":null,"created_at":"2022-05-30T11:31:42.605Z","updated_at":"2024-07-18T11:24:13.055Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/owners"}},"keywords":["TDD","bdd","dlang","dub","no-nonsense","test","test runner"],"created_at":"2024-08-04T01:00:42.449Z","updated_at":"2024-11-18T20:31:35.888Z","avatar_url":"https://gitlab.com/uploads/-/system/project/avatar/7557217/logo.png","language":null,"funding_links":[],"categories":["Testing Frameworks"],"sub_categories":["Bare metal / kernel development"],"readme":"silly [![Repository](https://img.shields.io/badge/repository-on%20GitLab-orange.svg)](https://gitlab.com/AntonMeep/silly) [![pipeline\nstatus](https://gitlab.com/AntonMeep/silly/badges/master/pipeline.svg)](https://gitlab.com/AntonMeep/silly/commits/master) [![coverage\nreport](https://gitlab.com/AntonMeep/silly/badges/master/coverage.svg)](https://gitlab.com/AntonMeep/silly/commits/master) [![ISC\nLicence](https://img.shields.io/badge/licence-ISC-blue.svg)](https://gitlab.com/AntonMeep/silly/blob/master/LICENSE) [![Package\nversion](https://img.shields.io/dub/v/silly.svg)](https://gitlab.com/AntonMeep/silly/tags)\n=====\n\n**silly** is a modern and light test runner for the D programming language.\n\n# Used by\n\n[Optional](http://optional.dub.pm/), [expected](http://expected.dub.pm/), [ddash](http://ddash.dub.pm/), and more!\n\n\u003e Got a cool project that uses **silly**? [Let us know!](https://gitlab.com/AntonMeep/silly/issues)\n\n# Features\n\n- Easy to install and use with dub\n- No changes of your code are required to start using silly\n- Seamless integration with `dub test`\n- Named tests\n- Multi-threaded test execution\n- Filtering tests\n- Colourful output\n\n# Getting started\n\nAdd **silly** to your project:\n\n```\n$ dub add silly\n```\n\nThis should be it! Try to run tests:\n\n```\n$ dub test\n```\n\nIf it succeeded then congratulations, you have just finished setting up **silly**! Make sure to add more tests and give them nice names.\n\n# Troubleshooting\n\nUnfortunately, setup isn't that easy sometimes and running `dub test` will fail. Don't panic, most of the issues are caused by the quirks and twists of dub. Here are some suggestions on what to check first:\n\n## Make sure `main()` function isn't defined when built in `unittest` mode\n\nSo, instead of this:\n```d\nvoid main() {\n\n}\n```\n\nDo this:\n```d\nversion(unittest) {\n\t// Do nothing here, dub takes care of that\n} else {\n\tvoid main() {\n\n\t}\n}\n```\n\n## Make sure there is a special `unittest` configuration in your dub.json/dub.sdl\n\n```json\n{\n    ...\n\t\"configurations\": [\n\t\t{\n\t\t\t\"name\": \"executable\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"unittest\"\n\t\t}\n\t]\n}\n```\n\nSee also [#32](https://gitlab.com/AntonMeep/silly/issues/32).\n\n\u003e **Pro Tip**: dub configurations can have `dependencies` as well! You may want to add silly as a dependency only for the `unittest` configuration to indicate that it's only used for tests.\n\n## Make sure there is no `targetType: executable` in `unittest` configuration in your dub.json/dub.sdl\n\nInstead of this:\n\n```json\n{\n\t...\n\t\"configurations\": [\n\t\t...\n\t\t{\n\t\t\t\"name\": \"unittest\",\n\t\t\t\"targetType\": \"executable\",\n\t\t\t...\n\t\t}\n\t]\n}\n```\n\nDo this:\n\n```json\n{\n\t...\n\t\"configurations\": [\n\t\t...\n\t\t{\n\t\t\t\"name\": \"unittest\",\n\t\t\t...\n\t\t}\n\t]\n}\n```\n\nSee [#12](https://gitlab.com/AntonMeep/silly/issues/12) for more information.\n\n## Nothing helped?\n\nOpen a new [issue](https://gitlab.com/AntonMeep/silly/issues), we will be happy to help you!\n\n# Naming tests\n\nIt is as easy as adding a `string` [user-defined attribute](https://dlang.org/spec/attribute.html#UserDefinedAttribute) to your `unittest` declaration.\n\n```d\n@(\"Johny\")\nunittest {\n\t// This unittest is named Johny\n}\n```\n\nIf there are multiple such UDAs, the first one is chosen to be the name of the unittest.\n\n```d\n@(\"Hello, \") @(\"World!\")\nunittest {\n\t// This unittest's name is \"Hello, \"\n}\n```\n\n# Command line options\n\n**Silly** accept various command-line options that let you customize its behaviour:\n\n```\n$ dub test -- \u003coptions\u003e\n\nOptions:\n  --no-colours                    Disable colours\n  -t \u003cn\u003e      --threads \u003cn\u003e       Number of worker threads. 0 to auto-detect (default)\n  -i \u003cregexp\u003e --include \u003cregexp\u003e  Run tests if their name matches specified regular expression. See filtering tests\n  -e \u003cregexp\u003e --exclude \u003cregexp\u003e  Skip tests if their name matches specified regular expression. See filtering tests\n              --fail-fast         Stop executing all tests when a test fails\n  -v          --verbose           Show verbose output (full stack traces, location and durations)\n  -h          --help              Help information\n```\n\n# Filtering tests\n\nWith `--include` and `--exclude` options it's possible to control what tests will be run. These options take regular expressions in [std.regex'](https://dlang.org/phobos/std_regex.html#Syntax%20and%20general%20information) format.\n\n`--include` only tests that match provided regular expression will be run, other tests will be skipped.\n`--exclude` all of the tests that don't match provided regular expression will be run.\n\n\u003e Using both options at the same time will produce unexpected results!\n\n# Best practices\n\n- Running tests in multi-threaded mode (default) can potentially cause issues, try running tests with `--threads 1`\n- Although unittests inside of nested classes and structs are discovered and executed by Silly, it may be unreliable. Consider having unittest blocks on the toplevel\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/gitlab.com%2FAntonMeep%2Fsilly","html_url":"https://awesome.ecosyste.ms/projects/gitlab.com%2FAntonMeep%2Fsilly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/gitlab.com%2FAntonMeep%2Fsilly/lists"}