{"id":18408331,"url":"https://github.com/pingcap/mysql-tester","last_synced_at":"2025-04-05T04:10:52.749Z","repository":{"id":38373929,"uuid":"249188235","full_name":"pingcap/mysql-tester","owner":"pingcap","description":"A Golang implementation of MySQL Test Framework","archived":false,"fork":false,"pushed_at":"2025-01-08T13:53:12.000Z","size":200,"stargazers_count":67,"open_issues_count":31,"forks_count":66,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-29T03:06:54.749Z","etag":null,"topics":[],"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/pingcap.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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":"2020-03-22T13:23:09.000Z","updated_at":"2025-02-18T10:03:23.000Z","dependencies_parsed_at":"2023-11-24T07:31:10.753Z","dependency_job_id":"1ec9e977-c2bf-4c09-b0ad-b59b630ed102","html_url":"https://github.com/pingcap/mysql-tester","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/pingcap%2Fmysql-tester","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pingcap%2Fmysql-tester/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pingcap%2Fmysql-tester/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pingcap%2Fmysql-tester/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pingcap","download_url":"https://codeload.github.com/pingcap/mysql-tester/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247284949,"owners_count":20913704,"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-06T03:18:31.340Z","updated_at":"2025-04-05T04:10:52.727Z","avatar_url":"https://github.com/pingcap.png","language":"Go","readme":"# MySQL Tester\n\nThis is a golang implementation of [MySQL Test Framework](https://github.com/mysql/mysql-server/tree/8.0/mysql-test).\n\n## Requirements\n\n- All the tests should be put in [`t`](./t), take [t/example.test](./t/example.test) as an example.\n- All the expected test results should be put in [`r`](./r). Result file has the same file name with the corresponding test file, but with a default `.result` file extension, it can be changed by `-extension`, take [r/example.result](./r/example.result) as an examle.\n\n## How to use\n\nBuild the `mysql-tester` binary:\n```sh\nmake\n```\n\nBasic usage:\n```\nUsage of ./mysql-tester:\n  -all\n        run all tests\n  -host string\n        The host of the TiDB/MySQL server. (default \"127.0.0.1\")\n  -log-level string\n        The log level of mysql-tester: info, warn, error, debug. (default \"error\")\n  -params string\n        Additional params pass as DSN(e.g. session variable)\n  -passwd string\n        The password for the user.\n  -port string\n        The listen port of TiDB/MySQL server. (default \"4000\")\n  -record\n        Whether to record the test output to the result file.\n  -reserve-schema\n        Reserve schema after each test\n  -retry-connection-count int\n        The max number to retry to connect to the database. (default 120)\n  -user string\n        The user for connecting to the database. (default \"root\")\n  -xunitfile string\n        The xml file path to record testing results.\n  -check-error\n        If --error ERR does not match, return error instead of just warn\n  -extension\n        Specify the extension of result file under special requirement, default as \".result\"\n```\n\nBy default, it connects to the TiDB/MySQL server at `127.0.0.1:4000` with `root` and no passward:\n```sh\n./mysql-tester # run all the tests\n./mysql-tester example # run a specified test\n./mysql-tester example1 example2   example3 # seperate different tests with one or more spaces\n# modify current example cases for .result output.\n./mysql-tester -record=1 -check-error=1\n\n```\n\nFor more details about how to run and write test cases, see the [Wiki](https://github.com/pingcap/mysql-tester/wiki) page.\n\n## Contributing\n\nContributions are welcomed and greatly appreciated. You can help by:\n\n- writing user document about how to use this framework\n- triaging issues\n- submitting new test cases\n- fixing bugs of this test framework\n- adding features that mysql test has but this implementation does not\n- ...\n\nIn case you have any problem, discuss with us in the [tidbcommunity](https://join.slack.com/t/tidbcommunity/shared_invite/enQtNzc0MzI4ODExMDc4LWYwYmIzMjZkYzJiNDUxMmZlN2FiMGJkZjAyMzQ5NGU0NGY0NzI3NTYwMjAyNGQ1N2I2ZjAxNzc1OGUwYWM0NzE) slack workspace.\n\nSee [CONTRIBUTING.md](./CONTRIBUTING.md) for details.\n\n## License\n\nMySQL Tester is under the Apache 2.0 license. See the [LICENSE](./LICENSE) file for details.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpingcap%2Fmysql-tester","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpingcap%2Fmysql-tester","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpingcap%2Fmysql-tester/lists"}