gauge icon indicating copy to clipboard operation
gauge copied to clipboard

Find concept definition file in some dependency

Open knysh opened this issue 4 years ago • 1 comments

Precondition

  1. There are 2 java projects
  2. The first one contains some common logic, steps implementation, etc, and also contains some common concepts.

Steps:

  1. User add the first project to the second one as dependency (e.g. maven dependency)

Expected result:

  1. Concepts from the first project are visible.

Describe the solution you'd like I would like to suggest find concepts not only in specific dir (or in gauge_specs_dir) but also in dependencies.

knysh avatar Dec 01 '20 12:12 knysh

Yes, i would like this feature as well. I create common steps for my testers and publish them in Jars. The jars are added as maven dependencies and work great already.

I would like to do the same with concepts. I can create a Concept with the steps that i have defined. When the tester adds my Jar as a dependency, they should have access to the Concept definitions as well.

Example:

@Step("Go to App.")
public void gotoApp() 
{
   // step implemented here
}

@Step("Enter Username <username>.")
public void enterUsername(String username) 
{
   // step implemented here
}

@Step("Enter Password <password>.")
public void enterPassword(String password) 
{
   // step implemented here
}

@Step("Click Login button.")
public void clickLogin() 
{
   // step implemented here
}

Concept File

# Common: Login to App using <username> and <password>.

* Go to App.
* Enter Username <username>.
* Enter Password <password>.
* Click Login button.

My Tester can then then do the following

# Spec Heading

## Scenario Heading
 * Common: Login to App using <username> and <password>.
 * Other steps here. 

alpha1592 avatar Aug 02 '21 18:08 alpha1592