Code Monkey home page Code Monkey logo

feagen's Introduction

Feagen

The desktop tool which using Node-Webkit able to generate UI test cucumber feature file and run test

Purpose

We are writing UI automation test use selenium and cucumber and maven. We know cucumber present the BDD test, which request the *.feature file like this:

  @ui @saledemo
  Feature: Login test
    @smoke
    Scenario: XXX user login and show welcome page
      When Login using your account
      And Go to the Normal login section
      Then You can see the welcome page

Then we code each "When", "And", "Then", "Given" such as

    @When("^Go to the Normal login section\\.$")
  	public HomePage go_to_the_Normal_login_section() throws Throwable {	    
  		SessionVarible.accountType = AccountTypeEnum.companyOverrdie;
  		loginServPage.waitForLoginServPagePageToLoad();
  		loginServPage.clickNormalLoginButton();		
  		return homePage;
  	}

We always write feature file first, then convert feature to code, is there a way to do it reversely, then answer it Yes. That's why we develop this feagen tool.

Idea

Here are the ideas:

  1. write page object for each page/page module
  2. write cucumber step class associate each page object with possible operations
  3. link operations with the cucumber step class name
  4. generate feature file by annotation

Instead of descript the steps, we can descript every possible operations in the page, such as: click the submit, navigate to about, get the user name in table, Then programming each step:

    @When("^click the submit\\.$")
  	public HomePage click_the_submit() throws Throwable {	    
  		driver.findElement('xxx').click()	
  		return homePage;
  	}

Every time we should return a page for the reference/link to the next step class, so when we choose one operation, it return a class, we display every methods in this step class, then choose next operation, link to next class etc.

About This Tool

This is a desktop tool associate the cucumber project, if follow the above standard write the cucumber UI test, you can use this tool to generate the customize feature file. If add the running script, can also directly run it.

Choose the steps image

Generate the feture
image

feagen's People

Contributors

equilar-insight avatar ycj28c avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.