Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I am able to run Cypress tests using a freestyle job on local jenkins setup, but allure-results doesn't generate #356

Open
pushprajTES opened this issue Mar 20, 2024 · 0 comments

Comments

@pushprajTES
Copy link

pushprajTES commented Mar 20, 2024

Issue

Context

  • Jenkins version: 2.440.1

  • Job type: Freestyle

  • Allure plugin version: Version: 2.31.1

  • Allure commandline version: 2.24.1

Problem description

Describe your problem in a meaningful way:

  • When I run my Cypress Automation tests on local without Jenkins then allure-results is generating
  • When I run jenkins on localhost:8181, then also allure-results is generated
  • But in when I run jenkins on localhost:8181, as GitHub project, then allure-results are not generating.

Logs & Traces

Started by user unknown or anonymous
Running as SYSTEM
Building in workspace /Users/cvcAdmin/.jenkins/workspace/freestyleDemoJob
[WS-CLEANUP] Deleting project workspace...
[WS-CLEANUP] Deferred wipeout is used...
[WS-CLEANUP] Done
The recommended git tool is: NONE
using credential tesUsername
Cloning the remote Git repository
Cloning repository https://bitbucket.org/klite/cypress-automation

git init /Users/cvcAdmin/.jenkins/workspace/freestyleDemoJob # timeout=10
Fetching upstream changes from https://bitbucket.org/klite/cypress-automation
git --version # timeout=10
git --version # 'git version 2.39.2 (Apple Git-143)'
using GIT_ASKPASS to set credentials tesUsername
git fetch --tags --force --progress -- https://bitbucket.org/klite/cypress-automation +refs/heads/:refs/remotes/origin/ # timeout=10
git config remote.origin.url https://bitbucket.org/klite/cypress-automation # timeout=10
git config --add remote.origin.fetch +refs/heads/:refs/remotes/origin/ # timeout=10
Avoid second fetch
git rev-parse refs/remotes/origin/demo-jenkins-setup^{commit} # timeout=10
Checking out Revision 3115642e22e23800bf11ead495985dabc0c71b1f (refs/remotes/origin/demo-jenkins-setup)
git config core.sparsecheckout # timeout=10
git checkout -f 3115642e22e23800bf11ead495985dabc0c71b1f # timeout=10
Commit message: "cypress.config.js edited"
git rev-list --no-walk 3115642e22e23800bf11ead495985dabc0c71b1f # timeout=10
[freestyleDemoJob] $ /bin/sh -xe /var/folders/gc/51_g04r14fz6m1zhr9zndx0m0000gn/T/jenkins6055224141279522555.sh

  • mkdir allure-results
  • node -v
    v21.6.2
  • npm -v
    10.2.4
  • npm install
    npm WARN deprecated @types/[email protected]: This is a stub types definition for cypress (https://cypress.io/). cypress provides its own type definitions, so you don't need @types/cypress installed!
    npm WARN deprecated @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-properties instead.
    npm WARN deprecated @cypress/[email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
    npm WARN deprecated [email protected]: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-inject.
    npm WARN deprecated @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-object-rest-spread instead.
    npm WARN deprecated [email protected]: Please use @jridgewell/sourcemap-codec instead
    npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
    npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
    npm WARN deprecated [email protected]: This package is now published under @cucumber/cucumber-expressions
    npm WARN deprecated [email protected]: This package is now published under @cucumber/gherkin
    npm WARN deprecated [email protected]: Cucumber is publishing new releases under @cucumber/cucumber

added 1169 packages, and audited 1170 packages in 1m

155 packages are looking for funding
run npm fund for details

5 vulnerabilities (4 moderate, 1 high)

To address all issues possible (including breaking changes), run:
npm audit fix --force

Some issues need review, and may require choosing
a different dependency.

Run npm audit for details.

  • npx cypress run --spec cypress/integration/features/login --headed --browser electron

DevTools listening on ws://127.0.0.1:63788/devtools/browser/fcd99136-83e4-4320-9b9a-27562e7dc5fa
Couldn't find tsconfig.json. tsconfig-paths will be skipped

Opening /dev/tty failed (6): Device not configured
tput: No value for $TERM and no -T specified
�[90m====================================================================================================�[39m

�[0m (�[4m�[1mRun Starting�[22m�[24m)�[0m


�[90m │�[39m �[90mCypress:�[39m 12.17.4 �[90m│�[39m
�[90m │�[39m �[90mBrowser:�[39m Electron 106 �[90m│�[39m
�[90m │�[39m �[90mNode Version:�[39m �[0mv21.6.2 �[90m(/Users/cvcAdmin/.jenkins/tools/jenkins.plugins.nodejs.tools�[0m �[90m│�[39m
�[90m │�[39m �[0m.NodeJSInstallation/NodeJS_21.6.2/bin/node)�[39m�[0m �[90m│�[39m
�[90m │�[39m �[90mSpecs:�[39m �[0m1 found (login.feature)�[0m �[90m│�[39m
�[90m │�[39m �[90mSearched:�[39m �[0mcypress/integration/features/login�[0m �[90m│�[39m
�[90m │�[39m �[90mExperiments:�[39m experimentalMemoryManagement=true �[90m│�[39m
�[90m └�

Running: �[90mlogin.feature�[39m �[90m(1 of 1)�[39m

��[0m klite Login tests�[0m
**************************** Test Started ****************************

�[92m �[0m�[32m 1 passing�[0m�[90m (6s)�[0m

�[32m (�[4m�[1mResults�[22m�[24m)�[39m


�[90m │�[39m �[90mTests:�[39m �[32m1�[39m �[90m│�[39m
�[90m │�[39m �[90mPassing:�[39m �[32m1�[39m �[90m│�[39m
�[90m │�[39m �[90mFailing:�[39m �[32m0�[39m �[90m│�[39m
�[90m │�[39m �[90mPending:�[39m �[32m0�[39m �[90m│�[39m
�[90m │�[39m �[90mSkipped:�[39m �[32m0�[39m �[90m│�[39m
�[90m │�[39m �[90mScreenshots:�[39m �[32m0�[39m �[90m│�[39m
�[90m │�[39m �[90mVideo:�[39m �[32mfalse�[39m �[90m│�[39m
�[90m │�[39m �[90mDuration:�[39m �[32m5 seconds�[39m �[90m│�[39m
�[90m │�[39m �[90mSpec Ran:�[39m �[32m�[32mlogin.feature�[32m�[39m �[90m│�[39m
�[90m └�

Opening /dev/tty failed (6): Device not configured
tput: No value for $TERM and no -T specified
�[90m====================================================================================================�[39m

�[0m (�[4m�[1mRun Finished�[22m�[24m)�[0m

�[90m �[39m �[90mSpec�[39m �[90mTests�[39m �[90mPassing�[39m �[90mFailing�[39m �[90mPending�[39m �[90mSkipped�[39m �[90m �[39m
�[90m
�[90m │�[39m �[32m✔�[39m �[0mlogin.feature�[0m �[90m00:05�[39m �[0m1�[0m �[32m1�[39m �[90m-�[39m �[90m-�[39m �[90m-�[39m �[90m│�[39m
�[90m └�
�[90m �[39m �[32m✔�[39m �[32mAll specs passed!�[39m �[90m00:05�[39m �[0m1�[0m �[32m1�[39m �[90m-�[39m �[90m-�[39m �[90m-�[39m �[90m �[39m

[freestyleDemoJob] $ /Users/cvcAdmin/.jenkins/tools/ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation/Allure_2.27.0/bin/allure generate /Users/cvcAdmin/.jenkins/workspace/freestyleDemoJob/allure-results -c -o /Users/cvcAdmin/.jenkins/workspace/freestyleDemoJob/allure-report
Report successfully generated to /Users/cvcAdmin/.jenkins/workspace/freestyleDemoJob/allure-report
Allure report was successfully generated.
Creating artifact for the build.
Artifact was added to the build.
Finished: SUCCESS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant