{"id":18910248,"url":"https://github.com/u-mulder/gotsu","last_synced_at":"2026-03-07T23:30:20.509Z","repository":{"id":145663092,"uuid":"58269315","full_name":"u-mulder/gotsu","owner":"u-mulder","description":"Testing web apps with Go","archived":false,"fork":false,"pushed_at":"2017-11-05T16:44:08.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-31T13:17:07.764Z","etag":null,"topics":["golang","http","testing","web"],"latest_commit_sha":null,"homepage":null,"language":"Go","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/u-mulder.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,"publiccode":null,"codemeta":null}},"created_at":"2016-05-07T14:23:53.000Z","updated_at":"2017-04-28T10:00:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"3fae8153-0cf5-4da0-a828-d89f575f63c9","html_url":"https://github.com/u-mulder/gotsu","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/u-mulder%2Fgotsu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/u-mulder%2Fgotsu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/u-mulder%2Fgotsu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/u-mulder%2Fgotsu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/u-mulder","download_url":"https://codeload.github.com/u-mulder/gotsu/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239899686,"owners_count":19715444,"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":["golang","http","testing","web"],"created_at":"2024-11-08T09:41:48.073Z","updated_at":"2026-03-07T23:30:20.441Z","avatar_url":"https://github.com/u-mulder.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gotsu\nTesting web apps with Go\n\n# Contents\n - [Install](#install)\n - [Run](#run)\n - [Config format](#config-format)\n\n# Install\nInstall app using `git clone` command\n\nAfter install build app with `go build`\n\nIn app directory create a `config` folder.\n\n\n# Run\n\nApp runs from command line:\n\n  `\u003e ./appname [parameters]`\n\nAvailable command line parameters:\n\n - `-config` - mandatory, name of config, which is path in app's `/config` path\n - `-type` - optional, type of config file, currently allowed types (`json` and `sitemapxml`), `json` is default,\n - `-filename` - optional, custom name of config file without extension, by default it's `\"conf\"`\n - `-verbose` - optional, output more / less data when tests are run, available values: (`n`, `y`), `y` by default\n\nExamples:\n\n - Test urls from `./config/mysite/conf.json` config file\n\n  `\u003e ./appname -config=mysite`\n\n - Test urls from `./config/myothersite/conf.xml` xml-config file\n\n  `\u003e ./appname -config=myothersite -type=sitemapxml`\n\n - Test urls from `./config/mysite/conf.json` config file and output only fail messages\n\n  `\u003e ./appname -config=mysite -verbose=n`\n\n - Test urls from `./config/mysite/urls.json` config file\n\n  `\u003e ./appname -config=mysite -filename=urls`\n\n# Config format\nApp supports config files in `json` and `xml` formats.\n\n`json` format is as follows:\n\n    {\n        \"protocol\": \"https\",\n        \"domain\":   \"www.mysite.com\",\n        \"checkUrls\": true,\n        \"urls\": [\n            {\n                \"url\": \"/url/here\",\n                \"statusCode\": 200,\n                \"skipUrlsCheck\": false,\n                \"findElements\": []\n            },\n            {\n                \"url\": \"/url/here\",\n                \"statusCode\": 200,\n                \"findElements\": [\n                    {\n                        \"def\": \".some-class\",\n                        \"countType\": \"eq\",\n                        \"count\": 3\n                    }\n                ]\n            }\n        ]\n    }\n\nWhere:\n\n- `protocol` can be either `http` or `https`\n- `checkUrls` option tells to check all local links on pages\n- `skipUrlsCheck` cancels `checkUrls` and all links on this concrete page will not be checked\n- `findElements` will find on this concrete page elements defined by following objects\n- `def` definition of collection objects to search (like jQuery selectors)\n- `countType` - mode of comparing collection size against `count`, available modes are\n\n    - `eq` - equals\n    - `gt` - greater than\n    - `gte` - greater than or equals\n    - `lt` - less than\n    - `lte` - less than or equals\n    - `ne` - not equals\n\n- `count` - expected collection size\n\n\n`xml` format fully supports google sitemap xml, but has less oppotunities than json.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fu-mulder%2Fgotsu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fu-mulder%2Fgotsu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fu-mulder%2Fgotsu/lists"}