{"id":27404574,"url":"https://github.com/gavrilaf/chuck","last_synced_at":"2025-10-11T13:32:54.941Z","repository":{"id":50195162,"uuid":"158758011","full_name":"gavrilaf/chuck","owner":"gavrilaf","description":"Lightweight proxy for REST API mocking and run integration test on mobile devices","archived":false,"fork":false,"pushed_at":"2022-12-08T04:57:40.000Z","size":3003,"stargazers_count":22,"open_issues_count":2,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-14T05:41:50.693Z","etag":null,"topics":["golang","integration-testing","mobile-app","mock-server","proxy"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gavrilaf.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-11-22T23:11:42.000Z","updated_at":"2024-05-07T09:57:52.000Z","dependencies_parsed_at":"2023-01-24T11:10:21.276Z","dependency_job_id":null,"html_url":"https://github.com/gavrilaf/chuck","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/gavrilaf/chuck","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavrilaf%2Fchuck","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavrilaf%2Fchuck/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavrilaf%2Fchuck/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavrilaf%2Fchuck/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gavrilaf","download_url":"https://codeload.github.com/gavrilaf/chuck/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavrilaf%2Fchuck/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279007339,"owners_count":26084282,"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","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["golang","integration-testing","mobile-app","mock-server","proxy"],"created_at":"2025-04-14T05:39:15.631Z","updated_at":"2025-10-11T13:32:54.916Z","avatar_url":"https://github.com/gavrilaf.png","language":"Go","readme":"# chuck\n\nThe proxy server for mobile application debugging, mocking nonexisting API, record and run integration tests.\n\n## Installation\n\n1. Install go\nMacOS using brew: *brew install go*\nOther operation systems: https://golang.org/doc/install\n\n2. Clone chuck repository: *git clone https://github.com/gavrilaf/chuck.git*\n\nChuck uses golang modules so you don't need to clone Chuck repo to the GOPATH directory. Clone Chuck anywhere. But if you clone Chuck to the GOPATH folder then setup GO111MODULE=on environment variable. Or build and run Chuck using makefile as described below.\n\n3. Load dependencies, build \u0026 check chuck: *make test* from the Chuck folder\nThis command build the project and run all unit tests. All tests should be passed.\n\n## How to use\n\nBefore run you have to install certificate from the project folder as root certificate (or generate and install new one).\n\n**Chuck** supports 4 modes:\n\n### Record mode\n\n*chuck rec [-address=addr] [-port=port] [-folder=folder] [-new_folder] [-prevent_304] [-focused]*\nIn this mode, the application is working as a transparent proxy but all traffic is saved to the disk.\n\n### Debug mode\n\nJust copy logs recorded in the rec mode to another folder. Make some requests **focused** (changed 'N' on 'F' in the index.txtx file), edit according responses and run **Chuck** in the debug mode.\n\n*chuck dbg [-address=addr] [-port=port] [-folder=folder]*\n\n**Chuck** runs as a transparent proxy but for the focused requests will be returned stored values. Also, you are able to add new requests to the index.txt. It's a very simple way how to stub unexisting REST API.\n\n### Integration tests recording mode\n\nAlmost the same with recording mode but with scenarios support. \n\n*chuck intg_rec [-address=addr] [-port=port] [-folder=folder] [-new_folder] [-prevent_304]*\n\nThe tested application should call endpoint *https://chuck-url/scenario/scenario_id/app_id/no* before any scenario execution. All following requests will be stored to the folder 'scenario_id'. app_id isn't used right now.\n\nExample\nThe application generates requests.\n```\nhttps://chuck-url/scenario/sc-12/123/no\nhttps://some-endpoint-1\nhttps://some-endpoint-2\nhttps://chuck-url/scenario/sc-674/123/no\nhttps://some-endpoint-1\nhttps://some-endpoint-4\n```\n\nChuck creates following log.\n\n```\nroot\n  |----sc-12\n  |       |-----index.txt (some-endpoint-1, some-endpoint-2)\n  |\n  |----sc-674\n  |       |-----index.txt (some-endpoint-1, some-endpoint-4)\n  ```\n  All requests are logged as focused.\n\n\n### Integration tests playing mode\n\n*chuck intg_rec [-address=addr] [-port=port] [-folder=folder]*\n\nAfter recording scenarios using recording mode **Chuck** is able to play it. The tested application should call endpoint *https://chuck-url/scenario/scenario_id/app_id/no* before any scenario execution. Each request should contains *'int-test-identifier = app_id'* in the http header. **Chuck** uses this header to determine which scenario is active for this application.\n\n### Using make\n\n*make run-rec/run-dgb/run-intg/run-intg-rec* is running **Сhuck** in different modes with default parameters.\n\n### How to generate new root certificates\n\n### Install self signed certificates on iOS simulator\n1. Launch Safari in the simulator.\n2. Drag’n’Drop ‘ca.pem’ file into the browser address line.\n3. Install certificate (press \"Allow\"/\"Done\"/\"Install\" on all questions)\n4. Navigate to Settings \u003e General \u003e About \u003e Certificate Trust Settings\n5. Enable full trust for the new installed certificate\n\n## Developing\n\nI hope **Chuck** is a good example how to write well-formed Golang code and how to use BDD with Golang.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgavrilaf%2Fchuck","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgavrilaf%2Fchuck","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgavrilaf%2Fchuck/lists"}