Git Product home page Git Product logo

prma85 / cypress-teamcity-reporter Goto Github PK

View Code? Open in Web Editor NEW
11.0 2.0 3.0 43 KB

It is a Cypress reporter based on Mocha to be used with TeamCity deployments which makes it possible to display test results in real-time, makes test information available on the Tests tab of the Build Results page

Home Page: https://www.npmjs.com/package/cypress-teamcity-reporter

License: MIT License

JavaScript 97.87% HTML 1.37% PowerShell 0.38% Shell 0.38%
cypress mocha testing cypress-io npm-package cypress-reporter

cypress-teamcity-reporter's Introduction

Hi there πŸ‘‹

Welcome to my page. My name is Paulo, and I am a Brazilian/Canadian citizen living in Canada. I have a passion for frontend development, reaching and teaching. I like to try new things, new techs, new trends... I live for creating a great UX, and I believe in an accessible web, a web for everyone.

I have 15+ more years of IT experience with a growing career. Started with application and hardware support, passing through business analysis, project manager, full-stack PHP developer (Joomla and WordPress) to the present days as Tech Lead and Senior Frontend Engineering.

I have a foot in academia, with experience as a professor in the university and technical courses. I also have few research papers published (check it on Research Gate and Academia.edu.

I also trying to make my part in the open-source community, contributing with few projects like Cypress.io, Backbone.JS, Gulp.JS, Docusaurus, Joomla, and DefinitelyTyped. I have also have some NPM packages published: cypress-teamcity-reporter, cypress-azure-keyvault, and better-coding-script

trophy

  • ⌨️ Tools I use:
    • Base: HTML5, CSS/SCSS, JavaScript ES6+, Typescript, PHP, NodeJS
    • UI: Bootstrap, Ant Design, Material UI, LESS/SASS
    • JS Libraries: React, Redux, Backbone, Marionette
    • JS Testing: Cypress, Jest, Mocha, React testing library
    • Bundlers: Webpack, Rollup, RequireJS, Babel
    • Cloud: MS Azure, Jenkins, CircleCI
    • DB: MySQL, Oracle, Postgres, MongoDB
    • CMS: Joomla, Moodle, Wordpress
  • 🌱 I’m currently self-learning: GraphQL, C#
  • πŸ‘― I’m looking to collaborate on more open-source projects
  • πŸ’¬ Ask me about anything related to frontend development with JS
  • 🌈 Pronouns: he/him/his
  • ⚑ Fun fact: I am a jiu-jitsu figther, blue belt

cypress-teamcity-reporter's People

Contributors

prma85 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

cypress-teamcity-reporter's Issues

Publishing videos are broken when using Gherkin 6 `Rule` syntax

Describe the bug

When we are using the new Rule syntax in a feature file, runner.on('test end') breaks with the described behaviour.

To Reproduce

Steps to reproduce the behavior:

  1. Create a simple scenario that has a Rule keyword around it
Rule: I see the temporary messages grouped based on their status

    @dev @test
    Scenario Outline: Hide messages section when empty
      Given I do not have a message
      When I go to the "/message" path
      Then I do not see the "<message group>" temporary messages section

  1. Run the scenario
  2. See the reporter error

Expected behavior

  • Ignore any Rule syntax from Gherkin 6 and up, and simply jump to the next step.
  • Make it safe with the ? operator to let the runner step to the next scenario/block

Actual behavior

runner.on('test end', function (test)..)

test.parent.parent.file. is undefined, hence calling replace on it breaks the runner.

Screenshots

Running:  TemporaryMessagesEdit/TemporaryMessagesEdit.feature                             (1 of 3)
##teamcity[testSuiteStarted name='Temporary messages - Edit existing temporary messages' flowId='69656']
##teamcity[testSuiteStarted name='I want to have a UI in Phoebe to edit existing temporary messages' flowId='69656']
##teamcity[testStarted name='Step back to Temporary Messages Overview from the messages details | ' captureStandardOutput='true' flowId='69656']
##teamcity[testFinished name='Step back to Temporary Messages Overview from the messages details | ' duration='1318' flowId='69656']
Cannot read properties of null (reading 'replace')
TypeError: Cannot read properties of null (reading 'replace')
    at L.<anonymous> (/../node_modules/cypress-teamcity-reporter/lib/teamcity.js:136:115)
    at L.emit (node:events:525:35)
    at A.emit (<embedded>:4479:18259)
    at Object.onMocha (<embedded>:4526:27943)
    at p.<anonymous> (<embedded>:4479:47429)
    at p.emit (node:events:513:28)
    at <embedded>:4479:26630
Cypress exited with code 1

Environment

  • Device: [Desktop]
  • OS: [MacOS Sonoma 14.1.2]

Additional context

Reference for Gherkin 6 Rule

Screenshot & video support

Current behavior

For projects that do not yet use / cannot use the Cypress Dashboard, the current way to save test evidence TC is to register screenshots and videos as Build Artifacts. This makes them discoverable from the Build page, but associating them with failing tests requires mentally mapping the filenames to the failing tests, which is a bit of a hassle.

Describe the solution you'd like

TC has built-in support for associating metadata with tests, including (since 2018) screenshots. It would be nice if we could hook into the screenshot event and emit the testMetadata type='image' service message. A tangential and equally missing feature is artifacts in the first place: there should be an option to turn on "Automatically publish test evidence as artifacts" so that the user does not have to reinvent the proper Ant-style search pattern each time.

Describe alternatives you've considered

Doing this manually after-the-fact (i.e. after Cypress finished, find each media file and echo something) is near impossible because test by file names (suite, test, retries...) lose all case-information and has _-replaced chars.

Additional context

Since videos are recorded one-per-suite, I do not think there is any way to make these easily included - apart from registering one and the same video for each test (could be better than nothing). There is no suite-level metadata in TC.

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on Greenkeeper branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.

Since we didn’t receive a CI status on the greenkeeper/initial branch, it’s possible that you don’t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/.

Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please click the 'fix repo' button on account.greenkeeper.io.

AnyΒ known issues with Cypress 5.x.x? (failed test reported as passed)

I recently updated one of my projects to use Cypress 5.2.0 and started seeing tests with failed assertions showing up as green in TeamCity. I have not yet had an opportunity to make a minimal reproducible example, so I'm just throwing this out here: has anyone else noticed any similar issue?

Expected: 5 tests, 4 passing, 1 failing as per TC Build Log excerpt below:

  Running:  reports.spec.js                                                                 (3 of 3)
    Reports area 1s
    (Results)
    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚ Tests:        5                                                                                β”‚
    β”‚ Passing:      4                                                                                β”‚
    β”‚ Failing:      1                                                                                β”‚
    β”‚ Pending:      0                                                                                β”‚
    β”‚ Skipped:      0                                                                                β”‚
    β”‚ Screenshots:  3                                                                                β”‚
    β”‚ Video:        true                                                                             β”‚
    β”‚ Duration:     18 seconds                                                                       β”‚
    β”‚ Spec Ran:     reports.spec.js                                                                  β”‚
...

Actual: 5 tests, 5 passing, 0 failing as per TC Tests tab screenshot below:

Screen Shot 2020-09-16 at 14 47 36

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.