{"id":32164655,"url":"https://github.com/elitau/tix","last_synced_at":"2026-02-22T11:03:29.608Z","repository":{"id":34922555,"uuid":"190452629","full_name":"elitau/tix","owner":"elitau","description":"Automatically run tests in the iex console when files are saved","archived":false,"fork":false,"pushed_at":"2022-03-16T23:29:53.000Z","size":2461,"stargazers_count":3,"open_issues_count":15,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-21T14:53:52.536Z","etag":null,"topics":["elixir-lang","iex","tdd","testing"],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elitau.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-06-05T19:02:31.000Z","updated_at":"2022-09-02T16:47:19.000Z","dependencies_parsed_at":"2022-08-08T02:16:27.550Z","dependency_job_id":null,"html_url":"https://github.com/elitau/tix","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/elitau/tix","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elitau%2Ftix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elitau%2Ftix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elitau%2Ftix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elitau%2Ftix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elitau","download_url":"https://codeload.github.com/elitau/tix/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elitau%2Ftix/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29710317,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-22T10:34:24.778Z","status":"ssl_error","status_checked_at":"2026-02-22T10:32:23.200Z","response_time":110,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["elixir-lang","iex","tdd","testing"],"created_at":"2025-10-21T14:50:09.015Z","updated_at":"2026-02-22T11:03:29.602Z","avatar_url":"https://github.com/elitau.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tix\n\nAutomatically re-run tests in Elixir's iex console when files are saved. It's like [mix test.watch](https://github.com/lpil/mix-test.watch) but without rebooting the application.\n\n## Usage\n\nStart an iex shell in test env with `MIX_ENV=test iex -S mix` and run `Tix.start()`. Or use the bundled mix task: `MIX_ENV=test iex -S mix tix`\n\nTix recompiles and executes tests automatically. Only relevant modules (see mix xref and mix test --stale) are recompiled.\nThe following algorithm is used to choose which test will be executed:\n\n1. Pinned test, if present: pin with `Tix.pin({\"/path/to/test.exs\", 23})` or use `tix:focus` comment (see below)\n2. Saved file is a test file (ending with `_test.exs`).\n3. Saved file has a test sibling (same name as saved file but with `_test.exs`-ending) living in the same folder. ✅\n4. Previously executed test if none of the above matches.\n\n### Pin a single test\n\nSometimes it's useful to focus on a single test and exclude other tests from being executed.\n\nUse `Tix.pin({\"path/to/some_test.exs\", 23})` in the iex Shell so that only this one test will be executed upon save of any file in the project. This is useful if many tests are broken but you want to focus on a single test.\nUse `Tix.unpin` to restore the above selection algorithm.\n\n### Other option to pin a test\n\nPlace the comment `tix:focus` just before or inside the test to be focused on. The test below the comment will be pinned.\n\n```elixir\n  use ExUnit.Case, async: true\n\n  # tix:focus\n  test \"this is the only one\" do\n    assert true\n  end\n```\n\nRemove the comment to restore the usual test selection behaviour.\n\n## Installation\n\nThe package can be installed by adding `tix` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:tix, \"~\u003e 0.4.0\", only: :test, runtime: false}\n  ]\nend\n```\n\nDocumentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)\nand published on [HexDocs](https://hexdocs.pm). Once published, the docs can\nbe found at [https://hexdocs.pm/tix](https://hexdocs.pm/tix).\n\n## Issues\n\n* Tests are randomized with the same seed.\n* pry session kills itself (after a timeout) and testix with it\n* Tags like `@tag :skip` are considered, but not custom ones that are often defined in test_helper.ex\n* Only the test helper at test/test_helper.exs is loaded. Other helpers should also be loaded.\n  Currently one need to load it by hand with: `TestIex.load_helper(\"spezifikation/test_helper.exs\")`\n* Test is executed twice when the editor automatically runs the formatter (which obviously saves the file a second time)\n\n## (Planned) features\n\n* Usage like \u003chttps://github.com/nccgroup/sobelow\u003e, eg. `mix tix`\n* Run all tests\n* Set debug breakpoints from within vs-code\n* Run only one explicit test on file save (pin test) ✅\n\n## Development\n\n### Integration tests\n\nInstall lux to execute integration tests:\n\n```bash\nbrew tap hawk/homebrew-hawk\nbrew install hawk/homebrew-hawk/lux\n```\n\nRun integration tests with `mix test.integration`\n\nSee integration_test folder for test cases.\n\nKnown problems:\nWhen running integration tests, the first run(s) may break with the false error because the dependecies must be installed first.\n\n### Unit tests\n\nUnit tests are in the usual /test folder.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felitau%2Ftix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felitau%2Ftix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felitau%2Ftix/lists"}