Hi All,
I am getting following error when I tried to run the task in gradle
-
Where: Build file ‘D:\MyFolder\CucumberProject\build.gradle’ line: 244
-
What went wrong: A problem occurred evaluating root project ‘CucumberProject’. > Could not find property ‘loadEnvDetails’ on root project ‘CucumberProject’.
task cucumberNew(dependsOn: [assemble, loadEnvDetails]) << {
// This is line 244
javaexec {
main = ‘cucumber.api.cli.Main’
classpath = configurations.cucumberRuntime
def arguments = []
if(rootProject.hasProperty(“tags”)) {
tags.tokenize().each { tag ->
arguments.add(’–tags’)
arguments.add(tag)
}
}
args = arguments + [
‘–tags’, ‘~@ignore’,
‘–format’, ‘junit:build/test-reports/all.xml’,
‘–format’, ‘html:build/test-reports/html/’,
‘–format’, ‘json:build/test-reports/cucumber-report.json’,
‘–format’, ‘pretty’,
‘–glue’, ‘src/test/resources/features’,
‘src/test/resources/features’]
systemProperties = config
} }
task loadEnvDetails() << {
loadEnvironmentConfiguration()
println System.properties[‘os.name’]
}
What I did wrong?