Closed divyaA closed 12 years ago
Hi
Just change the relative path to be target rather than target/cucumber
Thanks
--Kingsley
Sent from my iPhone
On 22 May 2012, at 16:11, divyaAreply@reply.github.com wrote:
I upgraded to the cucumber jvm version 1.0.7 , so that we can see the pretty test results, but this plugin does not seem to work.
Below is how I have my test runners set.
@RunWith(Cucumber.class) @Cucumber.Options(features = {"classpath:threeBarChart.feature"}, format = {"pretty", "html:target/cucumber", "json:target/cucumber.json"}) public class StandardThreeBarChartAccTest {
}
I installed the plugin on Jenkins, and configured the build so that the relative path to the workspace of the json reports generated by cucumber-jvm is target/cucumber
but the build fails even though all the tests pass and throws the below error
01:19:55 [INFO] BUILD SUCCESS 01:19:55 [INFO] ------------------------------------------------------------------------ 01:19:55 [INFO] Total time: 2:17:06.563s (Wall Clock) 01:19:55 [INFO] Finished at: Tue May 22 01:19:55 MDT 2012 01:19:55 [INFO] Final Memory: 198M/495M 01:19:55 [INFO] ------------------------------------------------------------------------ 01:20:10 [TASKS] Scanning folder '/opt/ci/hudson/workspace/paper-reports-qa' for files matching the pattern '*/.java,**/_.xml,_/.pig' - excludes: 01:20:10 [TASKS] Found 1696 files to scan for tasks 01:20:10 [TASKS] Found 118 open tasks. 01:20:10 [TASKS] Computing warning deltas based on reference build #42 01:20:11 Recording test results 01:20:14 [CucumberReportPublisher] Compiling Cucumber Html Reports ... 01:20:14 ERROR: Publisher net.masterthought.jenkins.CucumberReportPublisher aborted due to exception 01:20:14 java.lang.IllegalStateException: basedir /opt/ci/hudson/workspace/paper-reports-qa/target/cucumber does not exist. 01:20:14 at org.apache.tools.ant.DirectoryScanner.scan(DirectoryScanner.java:852) 01:20:14 at net.masterthought.jenkins.CucumberReportPublisher.findJsonFiles(CucumberReportPublisher.java:41) 01:20:14 at net.masterthought.jenkins.CucumberReportPublisher.perform(CucumberReportPublisher.java:61) 01:20:14 at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) 01:20:14 at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:700) 01:20:14 at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:675) 01:20:14 at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:653) 01:20:14 at hudson.model.Build$RunnerImpl.post2(Build.java:162) 01:20:14 at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:622) 01:20:14 at hudson.model.Run.run(Run.java:1434) 01:20:14 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) 01:20:14 at hudson.model.ResourceController.execute(ResourceController.java:88) 01:20:14 at hudson.model.Executor.run(Executor.java:238)
Reply to this email directly or view it on GitHub: https://github.com/masterthought/jenkins-cucumber-jvm-reports-plugin-java/issues/4
Hello, Thanks for replying but I got the same error with just setting up target as the relative path, please see below.
Is there a way to set up a absolute path and not relative path? like /tmp/cucumber-reports or something like that, which we could create ahead of time?
Thanks, Divya
[INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 5:05.160s [INFO] Finished at: Tue May 22 11:32:02 MDT 2012 [INFO] Final Memory: 81M/495M [INFO] ------------------------------------------------------------------------ [TASKS] Scanning folder '/opt/ci/hudson/workspace/paper-reports-dev' for files matching the pattern '*/.java,**/_.xml,_/.pig' - excludes: [TASKS] Found 1681 files to scan for tasks [TASKS] Found 117 open tasks. [TASKS] Computing warning deltas based on reference build #1419 Archiving artifacts Recording test results [CucumberReportPublisher] Compiling Cucumber Html Reports ... ERROR: Publisher net.masterthought.jenkins.CucumberReportPublisher aborted due to exception java.lang.IllegalStateException: basedir /opt/ci/hudson/workspace/paper-reports-qa/target does not exist. at org.apache.tools.ant.DirectoryScanner.scan(DirectoryScanner.java:852) at net.masterthought.jenkins.CucumberReportPublisher.findJsonFiles(CucumberReportPublisher.java:41) at net.masterthought.jenkins.CucumberReportPublisher.perform(CucumberReportPublisher.java:61) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:700) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:675) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:653) at hudson.model.Build$RunnerImpl.post2(Build.java:162) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:622) at hudson.model.Run.run(Run.java:1434) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:238)
Hi,
An absolute path is not possible as the path must be relative to the workspace - the easiest way to resolve this is to view the build's workspace. Click the workspace link from your job page and follow the path down until you find the directory that contains the cucumber.json file. If you have a maven project - it should be in the target directory - but the target directory may be a few directories down depending on your project structure. In my case the target directory is at the root level so I just put target - but you may have to put dir1/dir2/target or whatever the path to your target dir is.
let me know if this helps
--K
On 22 May 2012, at 20:04, divyaA wrote:
Hello, Thanks for replying but I got the same error with just setting up target as the relative path, please see below.
Is there a way to set up a absolute path and not relative path? like /tmp/cucumber-reports or something like that, which we could create ahead of time?
Thanks, Divya
[INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 5:05.160s [INFO] Finished at: Tue May 22 11:32:02 MDT 2012 [INFO] Final Memory: 81M/495M [INFO] ------------------------------------------------------------------------ [TASKS] Scanning folder '/opt/ci/hudson/workspace/paper-reports-dev' for files matching the pattern '*/.java,**/_.xml,_/.pig' - excludes: [TASKS] Found 1681 files to scan for tasks [TASKS] Found 117 open tasks. [TASKS] Computing warning deltas based on reference build #1419 Archiving artifacts Recording test results [CucumberReportPublisher] Compiling Cucumber Html Reports ... ERROR: Publisher net.masterthought.jenkins.CucumberReportPublisher aborted due to exception java.lang.IllegalStateException: basedir /opt/ci/hudson/workspace/paper-reports-qa/target does not exist. at org.apache.tools.ant.DirectoryScanner.scan(DirectoryScanner.java:852) at net.masterthought.jenkins.CucumberReportPublisher.findJsonFiles(CucumberReportPublisher.java:41) at net.masterthought.jenkins.CucumberReportPublisher.perform(CucumberReportPublisher.java:61) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:700) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:675) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:653) at hudson.model.Build$RunnerImpl.post2(Build.java:162) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:622) at hudson.model.Run.run(Run.java:1434) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:238)
Reply to this email directly or view it on GitHub: https://github.com/masterthought/jenkins-cucumber-jvm-reports-plugin-java/issues/4#issuecomment-5855791
Hi - also please have a look at this wiki page to see if it helps also:
https://github.com/masterthought/jenkins-cucumber-jvm-reports-plugin-java/wiki/Detailed-Configuration
On 22 May 2012, at 20:04, divyaA wrote:
Hello, Thanks for replying but I got the same error with just setting up target as the relative path, please see below.
Is there a way to set up a absolute path and not relative path? like /tmp/cucumber-reports or something like that, which we could create ahead of time?
Thanks, Divya
[INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 5:05.160s [INFO] Finished at: Tue May 22 11:32:02 MDT 2012 [INFO] Final Memory: 81M/495M [INFO] ------------------------------------------------------------------------ [TASKS] Scanning folder '/opt/ci/hudson/workspace/paper-reports-dev' for files matching the pattern '*/.java,**/_.xml,_/.pig' - excludes: [TASKS] Found 1681 files to scan for tasks [TASKS] Found 117 open tasks. [TASKS] Computing warning deltas based on reference build #1419 Archiving artifacts Recording test results [CucumberReportPublisher] Compiling Cucumber Html Reports ... ERROR: Publisher net.masterthought.jenkins.CucumberReportPublisher aborted due to exception java.lang.IllegalStateException: basedir /opt/ci/hudson/workspace/paper-reports-qa/target does not exist. at org.apache.tools.ant.DirectoryScanner.scan(DirectoryScanner.java:852) at net.masterthought.jenkins.CucumberReportPublisher.findJsonFiles(CucumberReportPublisher.java:41) at net.masterthought.jenkins.CucumberReportPublisher.perform(CucumberReportPublisher.java:61) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:700) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:675) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:653) at hudson.model.Build$RunnerImpl.post2(Build.java:162) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:622) at hudson.model.Run.run(Run.java:1434) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:238)
Reply to this email directly or view it on GitHub: https://github.com/masterthought/jenkins-cucumber-jvm-reports-plugin-java/issues/4#issuecomment-5855791
hi - are you stil having a problem with this or did you resolve it? Someone else raised an issue that the plugin only works when running on master and not on the build agent - could it be that you are running on a build agent and not master?
Hi Kingsley, sorry for the delay. We upgraded to the most recent version of your plugin, 0.0.10, bounced Jenkins, and this issue was resolved. Just tested it last night.
I upgraded to the cucumber jvm version 1.0.7 , so that we can see the pretty test results, but this plugin does not seem to work.
Below is how I have my test runners set.
@RunWith(Cucumber.class) @Cucumber.Options(features = {"classpath:threeBarChart.feature"}, format = {"pretty", "html:target/cucumber", "json:target/cucumber.json"}) public class StandardThreeBarChartAccTest {
}
I installed the plugin on Jenkins, and configured the build so that the relative path to the workspace of the json reports generated by cucumber-jvm is target/cucumber
but the build fails even though all the tests pass and throws the below error
01:19:55 [INFO] BUILD SUCCESS 01:19:55 [INFO] ------------------------------------------------------------------------ 01:19:55 [INFO] Total time: 2:17:06.563s (Wall Clock) 01:19:55 [INFO] Finished at: Tue May 22 01:19:55 MDT 2012 01:19:55 [INFO] Final Memory: 198M/495M 01:19:55 [INFO] ------------------------------------------------------------------------ 01:20:10 [TASKS] Scanning folder '/opt/ci/hudson/workspace/paper-reports-qa' for files matching the pattern '*/.java,**/_.xml,_/.pig' - excludes: 01:20:10 [TASKS] Found 1696 files to scan for tasks 01:20:10 [TASKS] Found 118 open tasks. 01:20:10 [TASKS] Computing warning deltas based on reference build #42 01:20:11 Recording test results 01:20:14 [CucumberReportPublisher] Compiling Cucumber Html Reports ... 01:20:14 ERROR: Publisher net.masterthought.jenkins.CucumberReportPublisher aborted due to exception 01:20:14 java.lang.IllegalStateException: basedir /opt/ci/hudson/workspace/paper-reports-qa/target/cucumber does not exist. 01:20:14 at org.apache.tools.ant.DirectoryScanner.scan(DirectoryScanner.java:852) 01:20:14 at net.masterthought.jenkins.CucumberReportPublisher.findJsonFiles(CucumberReportPublisher.java:41) 01:20:14 at net.masterthought.jenkins.CucumberReportPublisher.perform(CucumberReportPublisher.java:61) 01:20:14 at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) 01:20:14 at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:700) 01:20:14 at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:675) 01:20:14 at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:653) 01:20:14 at hudson.model.Build$RunnerImpl.post2(Build.java:162) 01:20:14 at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:622) 01:20:14 at hudson.model.Run.run(Run.java:1434) 01:20:14 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) 01:20:14 at hudson.model.ResourceController.execute(ResourceController.java:88) 01:20:14 at hudson.model.Executor.run(Executor.java:238)