BDD is not executing


#1

when i tried to execute the code. it always give this message “Verification accomplished successfully” but it is not executing the code". can someone tell me what’s wrong with the code? here i have added feature file and step definition code

feature file :

@tag
Feature: Title of your feature
I want to use this template for my feature file

@tag1
Scenario Outline: Title of your scenario outline
Given I am in the guru home page
And I logged as a manager
| userName | password |
| name1 | 5 |
When I navigate to new customer
Then create a new customer succesfully

Step definition

package test
import static com.kms.katalon.core.checkpoint.CheckpointFactory.findCheckpoint
import static com.kms.katalon.core.testcase.TestCaseFactory.findTestCase
import static com.kms.katalon.core.testdata.TestDataFactory.findTestData
import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject

import com.kms.katalon.core.annotation.Keyword
import com.kms.katalon.core.checkpoint.Checkpoint
import com.kms.katalon.core.checkpoint.CheckpointFactory
import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords
import com.kms.katalon.core.model.FailureHandling
import com.kms.katalon.core.testcase.TestCase
import com.kms.katalon.core.testcase.TestCaseFactory
import com.kms.katalon.core.testdata.TestData
import com.kms.katalon.core.testdata.TestDataFactory
import com.kms.katalon.core.testobject.ObjectRepository
import com.kms.katalon.core.testobject.TestObject
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords

import internal.GlobalVariable

import MobileBuiltInKeywords as Mobile
import WSBuiltInKeywords as WS
import WebUiBuiltInKeywords as WebUI

import org.openqa.selenium.WebElement
import org.openqa.selenium.WebDriver
import org.openqa.selenium.By

import com.kms.katalon.core.mobile.keyword.internal.MobileDriverFactory
import com.kms.katalon.core.webui.driver.DriverFactory

import com.kms.katalon.core.testobject.RequestObject
import com.kms.katalon.core.testobject.ResponseObject
import com.kms.katalon.core.testobject.ConditionType
import com.kms.katalon.core.testobject.TestObjectProperty

import com.kms.katalon.core.mobile.helper.MobileElementCommonHelper
import com.kms.katalon.core.util.KeywordUtil

import com.kms.katalon.core.webui.exception.WebElementNotFoundException

import cucumber.api.java.en.And
import cucumber.api.java.en.Given
import cucumber.api.java.en.Then
import cucumber.api.java.en.When
import io.cucumber.datatable.DataTable;

class NewCus {
/**
* The step definitions below match with Katalon sample Gherkin steps
*/
@Given(“I am in the guru home page”)
def I_am_in_the_guru_home_page() {
WebUI.openBrowser(“http://demo.guru99.com/v4/”);
}

@And("I logged as a manager")
def I_logged_as_a_manager(DataTable table) {
	List<Map<String, String>> data =table.asMaps(String.class, String.class);
	WebUI.setText(findTestObject('login/InputUserName'), data[0].userName);
	WebUI.setText(findTestObject('login/InputPassword'), data[1].password);
	WebUI.click(findTestObject('login/ButtonLogin'));
}

@When("I navigate to new customer")
def I_navigate_to_new_customer() {
}
@Then("create a new customer succesfully")
def create_a_new_customer_succesfully() {
}

}


BDD - Cucumber Feature File
#2

Scenario: Title of your scenario outline


#3

I changed the title of scenario. but still didn’t work


#4

I did not mean changing the title of the scenario. You could use the following statement instead of your statement.

Scenario: Title of your scenario outline


#5

it worked…