Initial knowledge gauge automatic test framework

Source: Internet
Author: User

Segmentfault Reading

Official website: https://docs.gauge.org/latest/index.html


Introduced:

Gauge is a lightweight, cross-platform test automation tool that can be used to write test case capabilities in different languages. Gauge is essentially a BDD (behavior-driven development) testing framework. If you understand BDD then it will be easier to understand the use of the gauge tool.

Compared to the general BDD framework, gauge has the following features:

    • Compatible with multiple systems: Window/macos/linux, which is based on go language development.
    • Supports multiple programming languages: Java, Python, JavaScript, Ruby, and more.
    • IDE support: Both Visual Studio code and IntelliJ can find the appropriate plug-in.
    • Markdown Syntax: Unlike the general BDD framework, gauge describes behavior through markdown.
    • Multiple data support: see the Official document supports reading of CSV data files.
    • Support test reports: You can generate HTML, XML, and JSON-formatted reports.


Installation:

GitHub Address: https://github.com/getgauge/gauge/releases

Here's a general installation method. Select the corresponding download version according to your operating system. Here, take windows as an example, download the gauge-1.0.2-windows.x86_64.zip file, extract the gauge.exe file, and place the file under the environment variable path settings directory.

Open the Windows command prompt and enter the gauge help carriage return.

If you see the information above, the installation is successful.


To create a project:

First, you need to install the programming language development environment, Java or Python, and this article will take Python as an example.
1, create an empty directory, such as: gauge_demo/.

2, cmd switch to the directory below, enter the gauge init python command.

Now you will find a lot more files under the gauge_demo/directory.

3. Open the directory with VS code. It is best to install a gauge plugin first.
Https://marketplace.visualstudio.com/items?itemName=getgauge.gauge


To run the test:

Gauge has some sample code in the generated project, so we can run the sample code directly. Execute the command under the gauge_demo/directory gauge run specs .

Now, open the index.html file to the \gauge_demo\reports\html-report\ directory.

In this age of looking at the face, you test report is not good-looking, we all do not want to learn.

This article just let you have a general understanding of the gauge test framework, if you are interested in reading, specs/and step_impl/directory files, find their correspondence.

Initial knowledge gauge automatic test framework

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.