{"id":18821525,"url":"https://github.com/sixpack/sixpack-java","last_synced_at":"2025-10-29T01:04:27.484Z","repository":{"id":25990651,"uuid":"29432931","full_name":"sixpack/sixpack-java","owner":"sixpack","description":"A Java client for the Sixpack A/B testing framework https://github.com/seatgeek/sixpack","archived":false,"fork":false,"pushed_at":"2016-07-15T20:47:45.000Z","size":248,"stargazers_count":134,"open_issues_count":5,"forks_count":12,"subscribers_count":33,"default_branch":"master","last_synced_at":"2024-04-07T15:37:56.246Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sixpack.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-18T16:52:50.000Z","updated_at":"2024-03-31T14:15:39.000Z","dependencies_parsed_at":"2022-08-24T14:19:22.446Z","dependency_job_id":null,"html_url":"https://github.com/sixpack/sixpack-java","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/sixpack%2Fsixpack-java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sixpack%2Fsixpack-java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sixpack%2Fsixpack-java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sixpack%2Fsixpack-java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sixpack","download_url":"https://codeload.github.com/sixpack/sixpack-java/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223612903,"owners_count":17173631,"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":[],"created_at":"2024-11-08T00:43:48.652Z","updated_at":"2025-10-29T01:04:27.407Z","avatar_url":"https://github.com/sixpack.png","language":"Java","funding_links":[],"categories":["测试","Test"],"sub_categories":[],"readme":"# sixpack-java\n\n[![Build Status](https://travis-ci.org/seatgeek/sixpack-java.svg?branch=master)](https://travis-ci.org/seatgeek/sixpack-java) [![Coverage Status](https://coveralls.io/repos/seatgeek/sixpack-java/badge.svg?branch=master\u0026service=github\u0026t=rRY7ax)](https://coveralls.io/github/seatgeek/sixpack-java?branch=master)\n\nA Java client for SeatGeek's Sixpack a/b testing framework: https://github.com/seatgeek/sixpack\n\n### Installing\n\nSixpack-java is currently only being deployed to maven snapshots, to use it, add the following dependency to your build.gradle:\n\n```groovy\nrepositories {\n    maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }\n}\n\ndependencies {\n    compile 'com.seatgeek:sixpack-java:0.4-SNAPSHOT'\n}\n```\n\nor, if you're a maven user:\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.seatgeek\u003c/groupId\u003e\n  \u003cartifactId\u003esixpack-java\u003c/artifactId\u003e\n  \u003cversion\u003e0.4-SNAPSHOT\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n### Overview\n\nThe Sixpack client has some nomenclature to be familiar with...\n\n- A _Sixpack server_ is the deployment of the [Sixpack-server](https://github.com/seatgeek/sixpack)\n    that will be hosting your test results\n- An _experiment_ represents a single test in the _Sixpack server_. It can have multiple _alternatives_\n- An _alternative_ is one potential result returned to the client when _participating_ in an _experiment_\n- You start a test by _participating_ in an _experiment_ with _alternatives_\n- Once the server has selected an _alternative_ for you, you can _convert_ the _experiment_ when the user\n    performs the action that you're measuring\n\n### Getting Started\n\nAfter [installing](#installing)...\n\nThe first thing to do is create a `Sixpack` client using the `SixpackBuilder`:\n\n```java\n    Sixpack sixpack = new SixpackBuilder()\n            .setSixpackUrl(\"http://api.mycompany.com/sixpack\")\n            .setClientId(user != null ? user.sixpackId : getCachedClientId())\n            .build();\n```\n\nIt is recommended that you maintain a singleton instance of `Sixpack` with the DI library of your choice.\n\n### Creating Experiments\n\n0. Create a new experiment from your `Sixpack` instance:\n\n    ```java\n        Experiment colorsExperiment = Sixpack.experiment()\n                .withName(\"colors\")\n                .withAlternatives(\n                    new Alternative(\"control\"),\n                    new Alternative(\"red\"),\n                    new Alternative(\"green\"),\n                    new Alternative(\"blue\")\n                )\n                .build();\n    ```\n0. Participate in that new `Experiment` by calling `participate()`\n\n    ```java\n        ParticipatingExperiment participatingExperiment = colorsExperiment.participate();\n    ```\n0. When the user performs the action measured in the test, convert the experiment\n\n    ```java\n        participatingExperiment.convert();\n    ```\n\n### Contributing\n\n0. Fork this repo and clone your fork\n0. Make your desired changes\n0. Add tests for your new feature and ensure all tests are passing\n0. Commit and push\n0. Submit a Pull Request through Github's interface and a project maintainer will decide your changes\n    fate.\n\n_note: issues can be submitted via [github issues](https://github.com/seatgeek/sixpack-java/issues/new)_\n\n### License\n\nSixpack-Java is released under the [BSD 2-Clause License](http://opensource.org/licenses/BSD-2-Clause)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsixpack%2Fsixpack-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsixpack%2Fsixpack-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsixpack%2Fsixpack-java/lists"}