Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

98
Vistas
Mochaweasome contained only description for passed test cases

I'm using mochawesome report to capture my cypress execution. The test case shows simply pass and didn't find the steps that it gone through and assertion that is added as part of that test in the report.

Sample snapshot (Sorry for too many strike):

enter image description here

I'm very new to cypress and mocha world, and I would like to see all the action that has been done in that test. Like I can see very clear details in the cypress.open. How can I get all the such information as part of mochawesome report? Is there any centralized (support/index.js or plugin/index.js file) place to make this changes that will replicate everywhere in the program.

Expected:

Expected all the Actions should be captured as part of mochawesome report as like below sample:

It contains click() action status and submit action status in the report for that test case. and type() failed so that it will be very easy to debug the failures.

enter image description here

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

In the mochawesome report, each it block becomes one line of the report and you can put additional reporting using addConext as below (source: mochawesome documentation)

const addContext = require('mochawesome/addContext');
describe('test suite', function () {
  it('should add context', function () {
    // context can be a simple string
    addContext(this, 'simple string');

    // context can be an image url and the report will show it inline
    addContext(this, 'http://www.url.com/screenshot-maybe.jpg');

  });
});

But if you really want to generate the report as you have attached then you need to break each action into a test i.e. it block. Below is the sample code that can be used.

describe("Test suite",function(){
   const cy = "";//put your code to initialize cy
   it("Action 1", function(){
      //code to perform action
   });

   it("Action21", function(){
      //code to perform action2
   })

})

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda