{"id":18794882,"url":"https://github.com/acerv/gitlab-tester-tools","last_synced_at":"2025-12-29T22:30:15.932Z","repository":{"id":122919159,"uuid":"119055607","full_name":"acerv/gitlab-tester-tools","owner":"acerv","description":"Tools to automatize testing process during development with Gitlab","archived":false,"fork":false,"pushed_at":"2018-01-26T15:52:54.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-29T16:37:16.043Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/acerv.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-26T13:37:49.000Z","updated_at":"2018-01-26T13:40:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"2f18ffe1-9d04-41c0-8787-f5543b687e84","html_url":"https://github.com/acerv/gitlab-tester-tools","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/acerv%2Fgitlab-tester-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acerv%2Fgitlab-tester-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acerv%2Fgitlab-tester-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acerv%2Fgitlab-tester-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/acerv","download_url":"https://codeload.github.com/acerv/gitlab-tester-tools/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239719219,"owners_count":19685909,"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-07T21:31:32.097Z","updated_at":"2025-12-29T22:30:15.852Z","avatar_url":"https://github.com/acerv.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Table of contents\n- [What is gitlab-tester-tools](#what-is-gitlab-tester-tools)\n- [Gitlab setup](#gitlab-setup)\n    - [Create tester user](#create-tester-user)\n    - [Add tester user to your project](#add-tester-user-to-your-project)\n    - [Setup testing secret token](#setup-testing-secret-token)\n    - [Setting up the .gitlab-ci.yml file](#setting-up-the-gitlab-ciyml-file)\n        - [Delete a branch from pipeline](#delete-a-branch-from-pipeline)\n- [git-test plugin](#git-test-plugin)\n    - [How to use the plugin](#how-to-use-the-plugin)\n    - [How the plugin works](#how-the-plugin-works)\n- [TODO](#todo)\n\n# What is gitlab-tester-tools\nGitlab tester tools are a set of tools used to interact with Gitlab and\nautomatize the testing process during local development.\n\n    $ git add \u003cfiles i want to test\u003e\n    $ git test origin\n\nSimple as that...Gitlab tester tools makes testers' lifes easier.\n\n# Gitlab setup\n\n## Create tester user\nTo create the `tester` user, go in the Admin Area, select `New user` and set\n`Access Level` to `Regular`.\nOnce the creation process is finished, click on the `tester` user, in the Admin\nArea and go to `Impersonation Tokens`, then set `Scopes` to `api`.\n\n## Add tester user to your project\nGo to the project page and under `Settings -\u003e Members` add `tester` user\nwith Master role.\n\n## Setup testing secret token\nThe token that is generated for `tester` user now can be used to send requests\nto the Gitlab API. This can be done by exposing it to the pipeline environment\nvariables: go to `Settings -\u003e CI / CD -\u003e Secret variables` and create the\n`CI_TESTER_TOKEN` variable with the token value of the `tester` user.\n\nAt this point, `tester` user is the access to our Gitlab API and its token is\nexposed by `CI_TESTER_TOKEN`. All the times the project's pipeline will run,\n`CI_TESTER_TOKEN` will be exposed in order to interact with Gitlab using the\nHTTP protocol.\n\n## Setting up the .gitlab-ci.yml file\nThe pipeline file `.gitlab-ci.yml`, in order to work with the ci tools has to\nbe configured properly.\n\n### Delete testing branch from pipeline\nAn example on how to remove a branch from pipeline is the following:\n\n    stages:\n        - tests\n        - cleanup\n\n    mytests:\n        stage: tests\n        script:\n            - echo \"hello world\"\n        only:\n            refs:\n                - /^testing\\/.*/\n\n    delete-testing-branch:\n        stage: cleanup\n        script:\n            - ci_tools/gitlab-pipeline.py -d\n        # the cleanup must be executed on testing \"temporary\" branches only\n        only:\n            refs:\n                - /^testing\\/.*/\n        # always run this stage even if the previous stages are failing\n        when: always\n\nIn this example, the `delete-testing-branch` is always executed after any job\nwhich fails or not. Its purpose is to remove the current branch with `testing/`\nprefix.\n\nWith this setup, any branch starting with `testing/` prefix can be considered\nas a \"temporary branch\" used to trigger `tests` stage.\n\n# git-test plugin\n\n## How to use the plugin\nGit recognize plugins starting with `git-` prefix and inside the PATH, so, to\nuse the git-test plugin, PATH has to be initialized as following:\n\n    export PATH=$PATH:\u003cmy parent path\u003e/ci_tools\n\n## How the plugin works\nNote that to use this plugin the CI system must be configured to run tests\nwhen a commit has been received inside a branch with `testing/` name suffix.\nA way to do so in gitlab is to setup `.gitlab-ci.yml` like following:\n\n    stages:\n        - test\n\n    tests:\n        stage: test\n        script:\n            - echo \"this is a test\"\n        only:\n            refs:\n                - /^testing\\/.*/\n                - master\n\nWhen user runs `git test origin`, the plugin will upload the current\nmodifications inside a branch named `testing/\u003cusername\u003e/\u003crandom string\u003e`\nin the `origin` server.\n\nIn particular, git-test plugin simplifies the following procedure:\n\n    $ git stash --keep-index\n    $ git push stash:refs/heads/testing/\u003cusername\u003e/\u003crandom string\u003e\n    $ git stash pop\n\nAnd it can be used in the following way:\n\n    $ git add \u003cmy testing files\u003e\n    $ git test origin\n\n# License\nAll the source code and documentation is released under the BSD license.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facerv%2Fgitlab-tester-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Facerv%2Fgitlab-tester-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facerv%2Fgitlab-tester-tools/lists"}