{"id":28045670,"url":"https://github.com/hakanai/travel-agent","last_synced_at":"2026-04-29T15:39:05.938Z","repository":{"id":66716492,"uuid":"183571521","full_name":"hakanai/travel-agent","owner":"hakanai","description":"A Gradle plugin to deliberately exacerbate globalisation bugs when running tests","archived":false,"fork":false,"pushed_at":"2024-02-29T20:37:33.000Z","size":72,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-02-29T21:54:10.617Z","etag":null,"topics":["gradle","gradle-plugin","i18n","testing"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hakanai.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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2019-04-26T06:35:06.000Z","updated_at":"2021-10-26T23:23:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"b0ced4d8-3a8f-419c-b479-65615ae7a5f5","html_url":"https://github.com/hakanai/travel-agent","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hakanai%2Ftravel-agent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hakanai%2Ftravel-agent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hakanai%2Ftravel-agent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hakanai%2Ftravel-agent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hakanai","download_url":"https://codeload.github.com/hakanai/travel-agent/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253610475,"owners_count":21935707,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["gradle","gradle-plugin","i18n","testing"],"created_at":"2025-05-11T18:20:32.049Z","updated_at":"2026-04-29T15:39:05.562Z","avatar_url":"https://github.com/hakanai.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\nTravel Agent Plugin\n===================\n\n[![Build Status](https://travis-ci.org/trejkaz/travel-agent.svg?branch=master)](https://travis-ci.org/trejkaz/travel-agent)\n\nTravel Agent is a Gradle plugin to deliberately exacerbate globalisation bugs when running tests.\nGlobalisation preferences are randomly selected from a collection of different locales when the\ntest run is started.\n\nThis can help to find bugs which are somehow not caught by other tools such as [Forbidden API Checker][1],\nwhether it be because the code is touching new APIs which aren't yet known to be evil, or because the developer\nhas knowingly subverted the checking by performing some kind of incorrect workaround.\n\n\nApplying the Plugin\n-------------------\n\nTo include, add the following to your build script:\n\n(Groovy)\n\n```groovy\nplugins {\n    id 'org.trypticon.gradle.plugins.travel-agent' version '3.0.0'\n}\n```\n\n(Kotlin)\n\n```kotlin\nplugins {\n    id(\"org.trypticon.gradle.plugins.travel-agent\") version \"3.0.0\"\n}\n```\n\nOr if you cannot use the `plugins` block for some reason:\n\n(Groovy)\n\n```groovy\nbuildscript {\n    repositories { jcenter() }\n    dependencies { classpath 'org.trypticon.gradle.plugins:travel-agent:0.1.0+' }\n}\n\napply plugin: org.trypticon.gradle.plugins.travelagent.TravelAgentPlugin\n```\n\n(Kotlin)\n\n```kotlin\nbuildscript {\n    repositories { jcenter() }\n    dependencies { classpath(\"org.trypticon.gradle.plugins:travel-agent:0.1.0+\") }\n}\n\napply\u003corg.trypticon.gradle.plugins.travelagent.TravelAgentPlugin\u003e()\n```\n\n\nConfiguration\n-------------\n\nAdding trips to the list of available trips:\n\n(If you do find an interesting one, we'd like to hear about it too. Maybe it could be in the predefined trips?)\n\n(Groovy)\n\n```groovy\ntravelAgent {\n    availableTrips.empty()\n    availableTrips.add(Trip('en', 'AU', 'Australia/Sydney'))\n    availableTrips.add(providers.provider { new Trip('en', 'AU', 'Australia/Melbourne') })\n}\n```\n\n(Kotlin)\n\n```kotlin\nconfigure\u003cTravelAgentExtension\u003e {\n    availableTrips.empty()\n    availableTrips.add(Trip(\"en\", \"AU\", \"Australia/Sydney\"))\n    availableTrips.add(providers.provider { Trip(\"en\", \"AU\", \"Australia/Melbourne\") })\n}\n```\n\nFiltering out a trip which is known to cause failures:\n\n(Never a great idea, but sometimes you have no choice. For instance, if you're testing Gradle builds,\nGradle itself doesn't work when run in Turkish locale.)\n\n(Groovy)\n\n```groovy\ntravelAgent {\n    knownFailing { trip -\u003e trip.language == 'tr' }\n}\n```\n\n(Kotlin)\n\n```kotlin\nconfigure\u003cTravelAgentExtension\u003e {\n    knownFailing { trip -\u003e trip.language == \"tr\" }\n}\n```\n\nDisabling the travel agent entirely:\n\n(Groovy)\n\n```groovy\ntravelAgent {\n    enabled = false\n}\n```\n\n(Kotlin)\n\n```kotlin\nconfigure\u003cTravelAgentExtension\u003e {\n    enabled.set(false)\n}\n```\n\nDisabling the travel agent for a single task (the same pattern works for most other settings):\n\n(Groovy)\n\n```groovy\ntest {\n    travelAgent {\n        enabled = false\n    }\n}\n```\n\n(Kotlin)\n\n```kotlin\ntasks.named\u003cTest\u003e(\"test\") {\n    configure\u003cTravelAgentTaskExtension\u003e {\n        enabled.set(false)\n    }\n}\n```\n\n\nParameters\n----------\n\nIf a test fails in a specific region, you're going to want to go back there to investigate why.\nIn this situation, you can force the settings as follows:\n\n* `-Ptravelagent.language=...`\n* `-Ptravelagent.country=...`\n* `-Ptravelagent.timezone=...`\n\nPassing only some of these parameters and not others works as expected - the provided ones are\nused as a filter to narrow down the accepted trips.\n\n\n\n\n[1]: https://github.com/policeman-tools/forbidden-apis\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhakanai%2Ftravel-agent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhakanai%2Ftravel-agent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhakanai%2Ftravel-agent/lists"}