Skip to content

getgauge/gauge-python

Repository files navigation

Gauge-Python

Actions Status Contributor Covenant

This project adds Python language plugin for gauge.

Getting started

Pre-requisite

Installation

gauge install python

Create a gauge-python project

gauge init python

Run tests

gauge run specs

Useful links

Alternate Installation options

Install specific version

gauge install python -v 0.2.3
[pip / pip3] install getgauge

Offline installation

gauge install python --file gauge-python-0.2.3.zip
[pip / pip3] install getgauge

Build from Source

Pre-Requisites
Installing package dependencies
pip install -r requirements.txt
Tests
python build.py --test
Tests Coverage
python build.py --test
coverage report -m
Installing
python build.py --install
Creating distributable
python build.py --dist

This will create a .zip file in bin directory and a .tar.gz file in dist directory.

Deployment

Only contributors with push access can create a deployment.

The deployment process is managed via Github Actions.

Follow these steps to deploy gauge-python.

  • Create a Personal Access Token in Github with repo:public_repo scope (skip this step if you already have a PAT).
  • Run GITHUB_TOKEN={Your token} sh release.sh in gauge-python dir. This will trigger a deployment workflow on Github Actions. This workflow creates a release draft with all required assets and information.
  • Visit to the release draft, analyze and update the contents (remove unnecessary entries, mention Contributors, remove dependabot PR entries).
  • Publish the draft release.
  • Once the draft is published it will trigger another workflow on Github Actions, which will perform all the Post release tasks, In case of gauge-python it will upload the getgauge python packge to PyPi.
  • Once it's done please update the new release information in gauge-repository
  • That's it. Now the release can be announced on the required community platforms (chat, google group etc.)

Examples

  • Selenium: This project serves as an example for writing automation using Gauge. It uses selenium and various Gauge/Gauge-Python features. For more details, Check out the gauge-example-python repository.

  • Selenium and REST API: This project shows an example of how to setup Gauge, Gauge Python and Magento to test REST API. For more details, Check out the blog or gauge-magento-test repository.

License

The Gauge-Python is an open-sourced software licensed under the MIT license.

Copyright

Copyright 2018 ThoughtWorks, Inc.