title,body,link,tags,view_count,is_answered,score,answer_count
Code coverage for Chrome Extension e2e testing,"<p>I am using WebdriverIO / mocha for the e2e automation testing of Chrome Extension. So, I wonder is there any way to do a code coverage e.g. by instrumenting a code using nyc tool? If yes, what would be the proper way to do so given that my Chrome extension source code in ./src and it is built to a webpack bundle in /.dist folder (which is then loaded in Chrome browser). Is ./src or a ./dist folder should be instrumented in that case?</p>
<p>Thanks in advance for any hint :)</p>
<p>I have also tried the devtools service which is part of WebdriverIO, but its code coverage feature does not work at the moment, because of the known bug.</p>
",https://stackoverflow.com/questions/75219030/code-coverage-for-chrome-extension-e2e-testing,"['google-chrome-extension', 'automated-tests', 'code-coverage', 'e2e-testing', 'webdriver-io']",84,False,0,0
E2e testing for Google Login with Puppeteer,"<p>I'm new to Puppeteer and trying to write an e2e test for a React app that enables logins using the GoogleLogin component from @react-oauth/google.</p>
<p>The code below works until the Google sign in window opens, but then I don't know how to access elements. I've looked at the element and I know that there's an input of type email, so I'd like to wait for that selector, but <code>page</code> doesn't seem to be the place to access it.</p>
<p>How do I move to the next step with this test?</p>
<pre><code>const chalk = require( 'chalk' );

class LoginAccount {
  constructor( page ) {
    this.url = &quot;http://localhost:3000&quot;
    this.page = page;
  }

  async login( username, password ) {
    try {
      const navigationPromise = page.waitForNavigation();
      await this.page.goto( this.url );
      const selector = '[role=&quot;button&quot;]';
      await this.page.waitForSelector( selector );
      const button_handler = await page.$(selector);
      await button_handler.evaluate(b =&gt; b.click());
      await navigationPromise

      const email_field = 'input[type=&quot;email&quot;]'
      await page.waitForSelector( email_field )

      // Times out here

      console.log(&quot;Got email input&quot;)
      await this.page.type( email_field, username );

    } catch ( err ) {
      console.log( chalk.red( 'ERROR =&gt; ', err ) );
    }
  }
}

module.exports = ( page ) =&gt; new LoginAccount( page );
</code></pre>
",https://stackoverflow.com/questions/75405167/e2e-testing-for-google-login-with-puppeteer,"['google-oauth', 'puppeteer', 'e2e-testing']",154,True,0,1
NestJS E2E Testing &quot;TypeError: metatype is not a constructor&quot;,"<p>I am trying to create a basic e2e test for one of the routes on my NestJS API. The route has no parameters or request needed, it is a simple GET request. I have an authentication guard <code>ATGuard</code> that I have implemented and am using globally in my <code>AppModule</code>:</p>
<pre><code>@Module({
    imports: [
        HealthModule
    ],
    providers: [

        {
            provide: APP_GUARD,
            useExisting: ATGuard,
        },
        ATGuard
    ],
})
export class AppModule {}
</code></pre>
<p>My e2e test:</p>
<pre><code>describe(&quot;HealthController (e2e)&quot;, () =&gt; {
    let app: NestFastifyApplication;

    beforeAll(async () =&gt; {
        const mockAuthGuard: CanActivate = { canActivate: jest.fn(() =&gt; true) };

        const moduleFixture: TestingModule = await Test
            .createTestingModule({
                imports: [AppModule],
            })
            .overrideProvider(ATGuard).useClass(mockAuthGuard)
            .compile();

        app = moduleFixture.createNestApplication&lt;NestFastifyApplication&gt;(new FastifyAdapter());
        await app.init();
        await app.getHttpAdapter().getInstance().ready();
    });

    afterAll(async () =&gt; {
        await app.close();
    });

    it(&quot;/health (GET)&quot;, () =&gt; {
        return app
            .inject({
                method: &quot;GET&quot;,
                url: &quot;/health&quot;
            })
            .then((result) =&gt; {
                expect(result.statusCode).toBe(200);
            });
    });
});
</code></pre>
<p>When I run the test I receive the following error:
<a href=""https://i.stack.imgur.com/DncU8.png"" rel=""nofollow noreferrer"">enter image description here</a></p>
<p>Before I was mocking the <code>ATGuard</code>, I was receiving a 401 response, which makes sense. I tried to mock the <code>ATGuard</code> with this code <code>.overrideGuard(ATGuard).useClass(mockAuthGuard)</code>.
I was still receiving a 401 though, so I changed it to use <code>.overrideProvider</code> as seen above.</p>
<p>After adding the mocked guard I am now receiving this error. My only thought of what's breaking is that the <code>ATGuard</code> class has 3 injected dependencies, but since I'm mocking the class as a whole, I would assume I don't need to mock the dependencies as well.</p>
",https://stackoverflow.com/questions/76121842/nestjs-e2e-testing-typeerror-metatype-is-not-a-constructor,"['jestjs', 'nestjs', 'e2e-testing']",93,True,0,1
Create a test database for e2e testing in knex,"<p>I'm trying to create a database that needs to start empty and, in each e2e test case will receive some data. I tried this:</p>
<pre><code>const createTable = async (
  name: string,
  callback: (table: Knex.CreateTableBuilder) =&gt; void
) =&gt; {
  return db.schema.createTable(name, async (table) =&gt; {
    table.engine(&quot;memory&quot;);
    callback(table);
  });
};

const restartDb = async () =&gt; {
  await db.schema.dropTableIfExists(&quot;BudgetItem&quot;);
  await db.schema.dropTableIfExists(&quot;Budget&quot;);
};

export const startDb = async () =&gt; {
  await restartDb();

  await createTable(&quot;Budget&quot;, (table) =&gt; {
    // ...database schema that has
  });

  await createTable(&quot;BudgetItem&quot;, (table) =&gt; {
    // ...database schema that has
    table
      .integer(&quot;budgetId&quot;)
      .unsigned()
      .notNullable()
      .references(&quot;id&quot;)
      .inTable(&quot;Budget&quot;); // it have FK to Budget table
  });
};

</code></pre>
<p>And in each test I call this function here:</p>
<pre><code>export const useTestDb = () =&gt; {
  beforeEach(async () =&gt; {
    await startDb();
  });

  afterAll(async () =&gt; {
    await db.destroy();
  });
};
</code></pre>
<p>But this is causing some nondeterministic behavior, most of the time it says that one table doesn't exist, others it says that the table already exists,s and a few times it works.</p>
<p>Why is this happening? How can I create this test Db;</p>
",https://stackoverflow.com/questions/75914495/create-a-test-database-for-e2e-testing-in-knex,"['mysql', 'sql', 'query-builder', 'knex.js']",38,False,1,0
how to store variables in jenkins for e2e testing,"<p>I'm using <a href=""https://www.npmjs.com/package/dotenv"" rel=""nofollow noreferrer"">dotenv</a> for storing my test usernames and pwrds.
Example:
.env content examples:</p>
<pre><code>TEST_CONTENT_PWRD=&quot;123456&quot;
</code></pre>
<p>.ts content use example:</p>
<pre><code>const TEST_USR_LOOKUP: {[type:string]: TESTUser } = {
  USERA:{
    username: &quot;testABC&quot;, 
    pwrd: process.env.TEST_CONTENT_PWRD
  }
}
</code></pre>
<p>What I'm trying to do is add the values in JENKINS so that the values can be pulled in during the E2E step in the pipeline.</p>
<p>Is there a way to do this?</p>
",https://stackoverflow.com/questions/75900696/how-to-store-variables-in-jenkins-for-e2e-testing,"['jenkins', 'jenkins-plugins', 'e2e-testing', 'dotenv']",21,False,0,1
Cannot find module &#39;@app/common&#39; error when e2e testing,"<p>I have microservoce app in <code>NestJS</code></p>
<p>now I'am going to write some e2e test using <code>Jest</code> and <code>supertest</code></p>
<p>this is simplified structure of app folders .</p>
<p>there is a common <code>lib</code> that contain common module that can be used in every service .</p>
<p><a href=""https://i.stack.imgur.com/e80f7.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/e80f7.png"" alt=""enter image description here"" /></a></p>
<pre class=""lang-js prettyprint-override""><code>import { Test, TestingModule } from '@nestjs/testing';
import { INestApplication } from '@nestjs/common';
import { AppModule } from '../src/app.module';

describe('User Controller', () =&gt; {
    let app: INestApplication;

    beforeAll(async () =&gt; {
        const moduleRef: TestingModule = await Test.createTestingModule({
            imports: [AppModule]
        })
            .compile()
        app = moduleRef.createNestApplication();
        await app.init();
    });
});
</code></pre>
<p>when I try to create my app , I see an error like this</p>
<p>Cannot find module '@app/common' from '../src/infrastructure/data-source/user.data-source.ts'</p>
<p>it seems that it cant find modules in <code>lib</code></p>
",https://stackoverflow.com/questions/76280561/cannot-find-module-app-common-error-when-e2e-testing,"['testing', 'jestjs', 'nestjs']",36,True,0,1
"Is this functinal testing, E2E testing, or Integration testing?","<p>What can we call the testing described below?
Integration testing, functional testing, or E2E testing?</p>
<p>It's a set of tests that call the server's APIs to simulate the user's workflow. This test uses real server components, such as running PostgreSQL, Redis, and ElasticSearch using Docker Compose. However, this test doesn't cover the client's behavior.</p>
<p>I've seen this kind of test many times, and some say it's functional testing, while others say it's E2E testing.</p>
<p>In the sense that it simulates the user's workflow, we can call it E2E testing. However, since it doesn't cover the client's (UI) behavior, some say it's not E2E testing.</p>
<p>So is it functional testing? But some say functional testing focuses on one product function. In that sense, it's not functional testing as it covers multiple product functions to follow the user's workflow.
Then, is the safest way to call this just integration testing?</p>
",https://stackoverflow.com/questions/76274380/is-this-functinal-testing-e2e-testing-or-integration-testing,['testing'],21,False,0,0
Access AWS VPC network from GitHub Actions for e2e testing,"<p>We are switching our cicd pipelines to GitHub Actions and I am working to get our e2e tests working in the GHA pipeline.</p>
<p>The scenario:</p>
<ul>
<li>We want to e2e test a REST API in GitHub Actions</li>
</ul>
<p>The need:</p>
<ul>
<li>Establish access to our AWS dependencies so that we can run our API in the GHA pipeline and perform e2e tests against our development environment on AWS (databases, IAM, etc...)</li>
</ul>
<p>The question:</p>
<ul>
<li>Should we look for a GitHub Action for each AWS dependency we need or is there a way to establish a secure connection to the VPC network itself?</li>
</ul>
<p>I have searched StackOverflow (and Google) for questions/answers in this regard but I was unable to find anything directly related. Maybe I am missing something obvious or going in the wrong direction. Any insight would be greatly appreciated, Thanks!</p>
",https://stackoverflow.com/questions/75846967/access-aws-vpc-network-from-github-actions-for-e2e-testing,"['amazon-web-services', 'github-actions']",49,False,0,0
How To Setup MongoDB Memory Server In NestJS for E2E Testing?,"<h2>What I want</h2>
<p>I'm looking to integrate mongodb-memory-server in my E2E testing within NestJS.  I noticed that I need a mongodb instance to work with supertest, but I would like to not depend on an external database and would rather have the mongodb server in-memory.</p>
<h2>Problem</h2>
<p>I tried setting up mongodb-memory-server in my E2E test suite, but a couple of my tests it getting back a <strong>500 Internal Server Error</strong> when the expected status code is supposed to be 201.  Here is my code:</p>
<p><code>drive.e2e-spec.ts</code></p>
<pre class=""lang-js prettyprint-override""><code>import { HttpStatus, INestApplication } from '@nestjs/common';
import { getModelToken } from '@nestjs/mongoose';
import { Test, TestingModule } from '@nestjs/testing';
import { Types, Model } from 'mongoose';
import * as request from 'supertest';

import { AppModule } from '#app.module';
import { CreateDriveDto } from '#drive/dto/create-drive.dto';
import { Drive, DriveDoc } from '#drive/schema/drive.schema';
import {
  closeInMongodConnection,
  rootMongooseTestModule,
} from 'test/util/MongooseTestModule';
import { dataFromJoi } from 'test/util/generate-valid-sample-data';
import { configTestApp } from 'test/util/setup-test-app';

const route = `/api/test/v2/drive`;

// generate valid sample data from Joi schema
const validCreateData = dataFromJoi(CreateDriveDto);

let moduleFixture: TestingModule;
let app: INestApplication;
let mockDriveModel: Model&lt;DriveDoc&gt;;

beforeAll(async () =&gt; {
  moduleFixture = await Test.createTestingModule({
    imports: [AppModule, rootMongooseTestModule()],
  }).compile();

  app = moduleFixture.createNestApplication();
  mockDriveModel = moduleFixture.get&lt;Model&lt;DriveDoc&gt;&gt;(
    getModelToken(Drive.name),
  );
  configTestApp(app);
  await app.init();
});

afterEach(async () =&gt; {
  await closeInMongodConnection();
});

afterAll(async () =&gt; {
  await app.close();
});

describe(`Integration Test :: Route ${route}`, () =&gt; {
  describe(`POST`, () =&gt; {
    test('Return 400 if request is invalid', async () =&gt; {
      await request(app.getHttpServer())
        .post(route)
        .send({})
        .expect(HttpStatus.BAD_REQUEST)
        .then((res) =&gt; {
          expect(res.body).toHaveProperty('statusCode');
          expect(res.body).toHaveProperty('message');
        });
    });

    test('Return 201 and create new entry if request is valid', async () =&gt; {
      await request(app.getHttpServer())
        .post(route)
        .send(validCreateData)
        .expect(HttpStatus.CREATED);
    });
  });

  describe(`GET`, () =&gt; {
    test('Return 200 and an array', async () =&gt; {
      const doc = await mockDriveModel.create(validCreateData);
      await request(app.getHttpServer())
        .get(route)
        .expect(HttpStatus.OK)
        .then((res) =&gt; {
          expect(Array.isArray(res.body)).toBeTruthy();
        });
    });
  });
});
</code></pre>
<p><code>MongooseTestModule.ts</code></p>
<pre class=""lang-js prettyprint-override""><code>import { MongooseModule, MongooseModuleOptions } from '@nestjs/mongoose';
import { MongoMemoryServer } from 'mongodb-memory-server';
import { disconnect } from 'mongoose';

let mongod: MongoMemoryServer;

export const rootMongooseTestModule = (options: MongooseModuleOptions = {}) =&gt;
  MongooseModule.forRootAsync({
    useFactory: async () =&gt; {
      mongod = await MongoMemoryServer.create();
      const mongoUri = mongod.getUri();
      return {
        uri: mongoUri,
        ...options,
      };
    },
  });

export const closeInMongodConnection = async () =&gt; {
  await disconnect();
  if (mongod) await mongod.stop();
};
</code></pre>
<h2>Discussion</h2>
<p>The implementation that should be focused on is the <code>rootMongoseTestModule</code>, which is where mongodb-memory-server would be instantiated.  Setup doesn't seem to work. Any thoughts or advice?  I am also open to other testing strategies as well.  Thanks in advance!</p>
",https://stackoverflow.com/questions/76222539/how-to-setup-mongodb-memory-server-in-nestjs-for-e2e-testing,"['mongodb', 'testing', 'mongoose', 'nestjs']",101,False,0,0
session (Laravel) destroyed come back from other domain in cypress e2e testing,"<p>session destroyed after disabling chromeWebSecurity on the same test case in Cypress. When come back from another domain then return to the login page instead of the dashboard page.</p>
<p><a href=""https://github-production-user-asset-6210df.s3.amazonaws.com/72722281/240898095-7cd558ae-ac5a-4c85-8a6e-5c83838f1143.mp4"" rel=""nofollow noreferrer"">Error problem</a></p>
<p>Session not be destroyed after leaving th origin.</p>
",https://stackoverflow.com/questions/76331936/session-laravel-destroyed-come-back-from-other-domain-in-cypress-e2e-testing,"['cypress', 'automation-testing']",10,False,0,0
How to register cookie middleware for e2e testing?? - @nestjs/testing and fastify adapter,"<p>I use pactum and jest for e2e testing</p>
<p>but while testing the endpoint which sets cookies, nest throws an error</p>
<pre><code>[Nest] 3364  - 01/03/2023, 5:35:15 PM   ERROR [ExceptionsHandler] response.setCookie is not a function
TypeError: response.setCookie is not a function
</code></pre>
<p>But how to register cookie middleware for testing module??</p>
<p>app.e2e-spec.ts</p>
<pre><code>      let app: INestApplication
    
      beforeAll(async () =&gt; {
        const moduleRef = await Test.createTestingModule({
          imports: [AppModule],
        }).compile()
    
        app = moduleRef.createNestApplication&lt;NestFastifyApplication&gt;(
          new FastifyAdapter(),
        )
    
        app.useGlobalPipes(new ValidationPipe())
    
        await app.init()
        await app.getHttpAdapter().getInstance().ready()
    
        await app.listen(3333)
      })
    
      afterAll(() =&gt; {
        app.close()
      })
</code></pre>
",https://stackoverflow.com/questions/74995747/how-to-register-cookie-middleware-for-e2e-testing-nestjs-testing-and-fastif,"['cookies', 'jestjs', 'nestjs', 'fastify', 'nestjs-fastify']",254,True,0,1
How do i get text from shadow root when e2e testing with codecept-puppeteer?,"<p>This is my HTML Structure<br />
<img src=""https://i.stack.imgur.com/18mrc.png"" alt=""HTML Structure"" /></p>
<p>I want to make sure that the title is 'Favorite Restaurant', How do i test this using codecept-puppeteer ?</p>
<p>I already tried this, but it doesn't work</p>
<pre><code>Feature('Favorite Restaurant');

Before(({ I }) =&gt; {
  I.amOnPage('/#/favorite');
});

Scenario('showing empty favorite restaurants', async ({ I }) =&gt; {
  I.wait(3);
  const text = await I.grabTextFrom(
    'pierce/favorite-module .section-header h2',
  );
  console.log(text);
});
</code></pre>
<p><img src=""https://i.stack.imgur.com/d4u4H.png"" alt=""Test log"" /></p>
",https://stackoverflow.com/questions/75168741/how-do-i-get-text-from-shadow-root-when-e2e-testing-with-codecept-puppeteer,"['javascript', 'puppeteer', 'e2e-testing', 'shadow-dom', 'codeceptjs']",70,False,1,0
how to add performance checks for Web Vitals scores in E2E testing with different network conditions using playwright,"<p>I want to check the web performances scores like <strong>First Contentful Paint (FCP)</strong>, <strong>Time to Interactive (TTI)</strong>, and other web vitals score using playwright and also want to check <strong>network throttling</strong> in <strong>different conditions like slow 3g</strong> how can that be achieved using <strong>playwright</strong>.</p>
",https://stackoverflow.com/questions/75016221/how-to-add-performance-checks-for-web-vitals-scores-in-e2e-testing-with-differen,"['javascript', 'reactjs', 'playwright', 'playwright-test']",81,False,1,0
Cypress - E2E testing : How to login with two different users to execute two different files one after the other?,"<p>So my application uses microsoft login and then redirects back to the application.</p>
<p>I am trying to execute two test case files(.js) one after the other. I am doing so by importing them into a spec file and running it. The first step in both files is to login and then perform some task. Each file has different user credentials to login to. The first file with the first user, logs in and executes cases, but when the second file needs a different user login with his credentials, an error is thrown. I am calling a common login function for both files and only modifying the &quot;user&quot; parameter.</p>
<p>Can someone help me with a solution?</p>
<p>I have mentioned the login function I have.</p>
<p><a href=""https://i.stack.imgur.com/7tE4m.png"" rel=""nofollow noreferrer"">Error thrown for the second login</a></p>
<pre><code>Cypress.Commands.add(&quot;login&quot;, (user) =&gt;

 {  

 cy.sqlServer(select USERID, password from table name where User=${user}).then(function (result) { 

   var userID = result[0]   
   var password = result[1] 
   const credentials = { userID, password }

   cy.session([userID, password], () =&gt; {      
   cy.viewport('macbook-16')      
   cy.visit('https://websitename.com/')      
   cy.get('.login-btn').click()      
   //clicking accept cookie button      
   cy.get('#onetrust-accept-btn-handler').should('be.visible').click()    
  
   //clicking microsoft login button      
   cy.get('#microsoft-external-auth-button').should('be.visible').click()     
   //redirected to microsoft login      
   cy.origin('https://login.microsoftonline.com', { args: credentials }, ({ userID, password }) =&gt; {

   //entering username        
          
   //clicking next       
        
   //entering password       
         
    //clicking 'login' button      
         
    cy.wait(1000)      })    })  })})
</code></pre>
",https://stackoverflow.com/questions/76129056/cypress-e2e-testing-how-to-login-with-two-different-users-to-execute-two-dif,['cypress'],31,False,0,0
React native app crashes when e2e testing with a url using detox and Android Studio. The test runs fine on ios,"<p>When I try to run an e2e test with detox with the following test case, the app opens but does nothing, only the screen flashes once, and the test fails. This happens with all other similar tests that contain a url. Does anyone know what the issue is here?</p>
<p>Note: The test runs just fine on iOs, it only fails on Android.</p>
<pre><code>    const token = 'valid-token'
    const url = `&lt;test-token-url&gt;(not actual url)`
    await device.sendToHome()
    await device.launchApp({ newInstance: false, url })

    await waitFor(element(by.id('confirmForm')))
      .toBeVisible()
      .withTimeout(500)
    await element(by.id('password')).typeText('password')
    await element(by.id('submitButton')).tap()

    await waitFor(element(by.id('finishedTitle')))
      .toBeVisible()
      .withTimeout(500)

    await element(by.id('backButton')).tap()
    await dExpect(element(by.id('loginScreen'))).toBeVisible()
  })
</code></pre>
",https://stackoverflow.com/questions/75853322/react-native-app-crashes-when-e2e-testing-with-a-url-using-detox-and-android-stu,"['react-native', 'jestjs', 'e2e-testing', 'detox']",30,False,0,0
How to tap on Modal&#39;s Continue button without testIds in Detox E2E Testing for React Native app with Auth0 Universal Login?,"<p>In my React Native application, I am using Detox for end-to-end testing. My app's authorization flow includes Auth0 Universal Login, and I am struggling to find a way to tap on the &quot;Continue&quot; button within the Modal since there are no test IDs associated with either the Modal or the button. Can anyone suggest a solution or workaround for this issue? <a href=""https://i.stack.imgur.com/kuKnn.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/kuKnn.png"" alt=""enter image description here"" /></a></p>
<p>I have tried the following code to access the modal but It's not working</p>
<pre><code>waitFor(element(by.traits(['modal']))).toBeVisible();
const continueButton = element(by.text('Continue'));
await expect(continueButton).toBeVisible();
await continueButton.tap();
</code></pre>
",https://stackoverflow.com/questions/76117247/how-to-tap-on-modals-continue-button-without-testids-in-detox-e2e-testing-for-r,"['react-native', 'detox']",48,False,0,0
"Is this functinal testing, E2E testing, or Integration testing?","<p>What can we call the testing described below?
Integration testing, functional testing, or E2E testing?</p>
<p>It's a set of tests that call the server's APIs to simulate the user's workflow. This test uses real server components, such as running PostgreSQL, Redis, and ElasticSearch using Docker Compose. However, this test doesn't cover the client's behavior.</p>
<p>I've seen this kind of test many times, and some say it's functional testing, while others say it's E2E testing.</p>
<p>In the sense that it simulates the user's workflow, we can call it E2E testing. However, since it doesn't cover the client's (UI) behavior, some say it's not E2E testing.</p>
<p>So is it functional testing? But some say functional testing focuses on one product function. In that sense, it's not functional testing as it covers multiple product functions to follow the user's workflow.
Then, is the safest way to call this just integration testing?</p>
",https://stackoverflow.com/questions/76274380/is-this-functinal-testing-e2e-testing-or-integration-testing,['testing'],21,False,0,0
Failed to install google chrome because libu2f-udev packages not installed - nodejs 10.14.0 docker file,"<p>Nodejs 10.14.0</p>
<p>docker file e2e code</p>
<pre><code>ARG BUILD_ENV

RUN if [ &quot;$BUILD_ENV&quot; = &quot;test&quot; ]  ; then \
    wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - &amp;&amp; \
    sh -c 'echo &quot;deb http://dl.google.com/linux/chrome/deb/ stable main&quot; &gt;&gt; /etc/apt/sources.list.d/google.list' &amp;&amp; \
    apt-get update &amp;&amp; apt-get install -y google-chrome-stable; \
    fi`

`# unit test stage`
`FROM test as unitTest

ARG TEST_TYPE
RUN if [ &quot;$TEST_TYPE&quot; = &quot;unit&quot; ]  ; then \
    npm run test; \
    fi`

`# e2e test stage`
`FROM test as e2eTest
ARG BUILD_ENV
ARG AD_USERNAME
ARG AD_PASSWORD
ARG SALT
ARG TEST_TYPE
RUN if [ &quot;$TEST_TYPE&quot; = &quot;e2e&quot; ]  ; then \
    npm run e2e; \
    fi
</code></pre>
<p>log</p>
<p><a href=""https://i.stack.imgur.com/eBuhV.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/eBuhV.png"" alt=""build log file"" /></a></p>
<p>please kindly suggest solution for this issue
i don't want update nodejs version.</p>
<p>suggest solution to run e2e testing</p>
",https://stackoverflow.com/questions/76211318/failed-to-install-google-chrome-because-libu2f-udev-packages-not-installed-nod,"['node.js', 'linux', 'docker', 'google-chrome', 'azure-cicd']",58,False,0,0
How to register cookie middleware for e2e testing?? - @nestjs/testing and fastify adapter,"<p>I use pactum and jest for e2e testing</p>
<p>but while testing the endpoint which sets cookies, nest throws an error</p>
<pre><code>[Nest] 3364  - 01/03/2023, 5:35:15 PM   ERROR [ExceptionsHandler] response.setCookie is not a function
TypeError: response.setCookie is not a function
</code></pre>
<p>But how to register cookie middleware for testing module??</p>
<p>app.e2e-spec.ts</p>
<pre><code>      let app: INestApplication
    
      beforeAll(async () =&gt; {
        const moduleRef = await Test.createTestingModule({
          imports: [AppModule],
        }).compile()
    
        app = moduleRef.createNestApplication&lt;NestFastifyApplication&gt;(
          new FastifyAdapter(),
        )
    
        app.useGlobalPipes(new ValidationPipe())
    
        await app.init()
        await app.getHttpAdapter().getInstance().ready()
    
        await app.listen(3333)
      })
    
      afterAll(() =&gt; {
        app.close()
      })
</code></pre>
",https://stackoverflow.com/questions/74995747/how-to-register-cookie-middleware-for-e2e-testing-nestjs-testing-and-fastif,"['cookies', 'jestjs', 'nestjs', 'fastify', 'nestjs-fastify']",254,True,0,1
"Expected to find element: undefined, but never found it","<p>I'm performing E2E testing and trying to select the two check box from this list.</p>
<p><img src=""https://i.stack.imgur.com/4MZvf.png"" alt=""enter image description"" /></p>
<pre class=""lang-js prettyprint-override""><code>export class SignupPage {

  select_cuisine='.anchor'


  selectcuisine(){
    cy.get(this.select_cuisine.type=&quot;checkbox&quot;).check('Coffee &amp; Tea')
    
    }
}
</code></pre>
<pre class=""lang-js prettyprint-override""><code>import { SignupPage } from &quot;./Pages/signup_page&quot;


it.only('Sign up', function () {
  
  signupage.selectcuisine()
})
</code></pre>
<p>Error message.</p>
<p><img src=""https://i.stack.imgur.com/Gv74S.png"" alt=""enter image description here"" /></p>
<p>I want to select at least two checkboxes from the list to complete my end-to-end testing flow.</p>
",https://stackoverflow.com/questions/75061479/expected-to-find-element-undefined-but-never-found-it,"['javascript', 'automation', 'cypress', 'checkboxlist']",96,True,1,1
How to get date picker value in cypress,"<p><img src=""https://i.stack.imgur.com/4GbiT.png"" alt=""enter image description here"" /></p>
<p>I am doing some E2E test using cypress and I want to get the date that appears on a DatePicker element from my  app. I tried this but both return an empty string:</p>
<pre class=""lang-js prettyprint-override""><code>export class SettingPage {
  doc_expirydate='#txtDocExpiryDate'

  clickexpirydate (date) { 
    cy.get(this.doc_expirydate).type(date) 
  }

}
</code></pre>
<pre class=""lang-js prettyprint-override""><code>import { SettingPage } from &quot;./Pages/setting_page&quot;`
const settingpage = new SettingPage()

it('Setting_Page', function () {

  settingpage.clickexpirydate('type=date','2023-01-07')

}
</code></pre>
<p><img src=""https://i.stack.imgur.com/4ne4I.png"" alt=""enter image description here"" /></p>
<p>I want to enter the date to complete E2E testing.</p>
",https://stackoverflow.com/questions/75014958/how-to-get-date-picker-value-in-cypress,"['angular', 'testing', 'datepicker', 'cypress']",90,True,0,1
Make Jest setup wait until docker compose command is executed,"<p>I have Jest E2E project configured for Nx Nest app. My goal is to run <code>docker compose up</code> for E2E testing and <code>docker compose down</code> after testing is over.</p>
<p>In <code>global-setup.ts</code>, I wrote:</p>
<pre><code>/* eslint-disable */
var __TEARDOWN_MESSAGE__: string;

var os = require('os');

module.exports = async function () {
  // Start services that that the app needs to run (e.g. database, docker-compose, etc.).
  console.log('\nSetting up...\n');

  globalThis.execCmd = (cmd: string) =&gt; {
    const exec = require('child_process').exec;
    const command = exec(cmd, (err, stdOut, stdErr) =&gt; {
        if (err) {
            console.log(err);
            return;
        }

        console.log(stdOut);
    });

    return command;
  };

  const isWin = os.platform() === 'win32';
  const dockerComposeUpCmd = 'docker compose up';

  await globalThis.execCmd(dockerComposeUpCmd).on('exit', (code) =&gt; {
    console.log(`${command}: Finished with code ${code}`);
  });


  // Hint: Use `globalThis` to pass variables to global teardown.
  globalThis.__TEARDOWN_MESSAGE__ = '\nTearing down...\n';
};
</code></pre>
<p>The problem is that, when I run <code>npx nx e2e &lt;e2e-project&gt;</code>, all tests fail because of <code>Internal Server Error</code>, which happens because <code>docker compose up</code> is outran.</p>
<p>Any ideas?</p>
",https://stackoverflow.com/questions/75897362/make-jest-setup-wait-until-docker-compose-command-is-executed,"['typescript', 'docker-compose', 'jestjs', 'e2e']",77,False,1,1
(How) can I generate coverage reports in PHP using XDebug?,"<p>I use Cypress for E2E testing. Now I wonder, how can I produce coverage reports with PHP XDebug without PHPUnit? PCOV seams like a candidate; but this would again require to deactivate XDebug.</p>
<p>Tried XDebug, but it requires your tests to be written in PHPUnit.</p>
",https://stackoverflow.com/questions/76317635/how-can-i-generate-coverage-reports-in-php-using-xdebug,"['php', 'testing', 'cypress', 'code-coverage', 'e2e']",15,False,0,0
Protractor:Chrome driver download failed because api blocked by my company,"<p>I am running E2E testing on server but during npm install and webdriver-manager update --ignore_ssl --version.chrome =112.1223.39 command not able to download chrome browser any help how can i download .
I found my company not allow public access apis</p>
<p>It should download chrome and run full testing on server</p>
",https://stackoverflow.com/questions/76171595/protractorchrome-driver-download-failed-because-api-blocked-by-my-company,"['selenium-chromedriver', 'webdriver', 'protractor']",18,False,0,0
Cypress does not recognize step implementations in steps.js file,"<p>I'm trying to create a simple test with cypress.js.
I'm able to run the cypress application with the 'npx cypress open',
and it opens cypress application where I can choose 'E2E Testing' and it has a 'configured' badge.
The component Testing feature is 'not configured'.</p>
<p>After choosing the E2E testing I can choose a browser (I use Chrome v110 usually), and I'm able to click
'start e2e testing in chrome' button. The cypress app shows up in a chrome window, and it lists the available
feature files and I'm also able to click on it/them.</p>
<p><a href=""https://i.stack.imgur.com/MfgPz.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/MfgPz.png"" alt=""enter image description here"" /></a></p>
<p>When I click on the feature file it starts loading for a few seconds and then it fails.
On the left side of the page it shows me an error ('Step implementation missing' and few lines below: 'However, none of these files contained a step definition matching &quot;Websites URL.&quot;.'), and on the right side I see an empty &quot;Default blank page&quot;.</p>
<p><a href=""https://i.stack.imgur.com/rGps9.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/rGps9.png"" alt=""enter image description here"" /></a>
<a href=""https://i.stack.imgur.com/QrD7f.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/QrD7f.png"" alt=""enter image description here"" /></a></p>
<p>The stacktrace:</p>
<pre><code> at Context.eval (webpack://cypressautomation/./node_modules/@badeball/cypress-cucumber-preprocessor/lib/create-tests.js:315)
From previous event:
    at Context.thenFn (http://localhost:62221/__cypress/runner/cypress_runner.js:135696:63)
    at Context.then (http://localhost:62221/__cypress/runner/cypress_runner.js:135945:21)
    at wrapped (http://localhost:62221/__cypress/runner/cypress_runner.js:151126:19)
    at &lt;unknown&gt; (http://localhost:62221/__cypress/runner/cypress_runner.js:149985:15)
From previous event:
    at CommandQueue.runCommand (http://localhost:62221/__cypress/runner/cypress_runner.js:149951:8)
    at next (http://localhost:62221/__cypress/runner/cypress_runner.js:150151:19)
From previous event:
    at next (http://localhost:62221/__cypress/runner/cypress_runner.js:150151:39)
From previous event:
    at &lt;unknown&gt; (http://localhost:62221/__cypress/runner/cypress_runner.js:163718:77)
From previous event:
    at CommandQueue.run (http://localhost:62221/__cypress/runner/cypress_runner.js:163713:21)
    at CommandQueue.run (http://localhost:62221/__cypress/runner/cypress_runner.js:150215:15)
    at $Cy.runQueue (http://localhost:62221/__cypress/runner/cypress_runner.js:151106:14)
    at cy.&lt;computed&gt; [as then] (http://localhost:62221/__cypress/runner/cypress_runner.js:151188:12)
    at runnable.fn (http://localhost:62221/__cypress/runner/cypress_runner.js:151367:19)
    at callFn (http://localhost:62221/__cypress/runner/cypress_runner.js:104963:21)
    at ../driver/node_modules/mocha/lib/runnable.js.Runnable.run (http://localhost:62221/__cypress/runner/cypress_runner.js:104950:7)
    at &lt;unknown&gt; (http://localhost:62221/__cypress/runner/cypress_runner.js:158380:30)
From previous event:
    at Object.onRunnableRun (http://localhost:62221/__cypress/runner/cypress_runner.js:158363:53)
    at $Cypress.action (http://localhost:62221/__cypress/runner/cypress_runner.js:147614:28)
    at Runnable.run (http://localhost:62221/__cypress/runner/cypress_runner.js:156319:13)
    at ../driver/node_modules/mocha/lib/runner.js.Runner.runTest (http://localhost:62221/__cypress/runner/cypress_runner.js:105622:10)
    at &lt;unknown&gt; (http://localhost:62221/__cypress/runner/cypress_runner.js:105748:12)
    at next (http://localhost:62221/__cypress/runner/cypress_runner.js:105531:14)
    at &lt;unknown&gt; (http://localhost:62221/__cypress/runner/cypress_runner.js:105541:7)
    at next (http://localhost:62221/__cypress/runner/cypress_runner.js:105443:14)
    at &lt;unknown&gt; (http://localhost:62221/__cypress/runner/cypress_runner.js:105509:5)
    at timeslice (http://localhost:62221/__cypress/runner/cypress_runner.js:99435:27)
</code></pre>
<p>The codeline in cypress that throws the exception:</p>
<pre><code>node_modules/@badeball/cypress-cucumber-preprocessor/lib/create-tests.js:315:1
  313 |                     catch (e) {
  314 |                         if (e instanceof registry_1.MissingDefinitionError) {
&gt; 315 |                             throw new Error(createMissingStepDefinitionMessage(context, pickleStep, context.registry.parameterTypeRegistry));
      | ^
  316 |                         }
  317 |                         else {
  318 |                             throw e;
</code></pre>
<p>As I see from the errors above it can discover the feature files and also the &quot;steps.js&quot; (in my case loginSteps.js) but it does not recognize the step definitions inside even though it is using the correct syntax.</p>
<p>The package.json file:</p>
<pre><code>{
&quot;name&quot;: &quot;cypressautomation&quot;,
  &quot;version&quot;: &quot;1.0.0&quot;,
  &quot;lockfileVersion&quot;: 2,
  &quot;requires&quot;: true,
&quot;main&quot;: &quot;cypress.config.js&quot;,
  &quot;devDependencies&quot;: {
    &quot;@babel/core&quot;: &quot;^7.20.12&quot;,
    &quot;@babel/preset-env&quot;: &quot;^7.20.2&quot;,
    &quot;@cypress/webpack-preprocessor&quot;: &quot;^5.16.3&quot;,
    &quot;babel-loader&quot;: &quot;^9.1.2&quot;,
    &quot;cypress&quot;: &quot;^12.5.0&quot;,
    &quot;webpack&quot;: &quot;^5.75.0&quot;
}
&quot;dependencies&quot;: {
    &quot;@badeball/cypress-cucumber-preprocessor&quot;: &quot;^15.1.3&quot;,
    &quot;cypress-cucumber-preprocessor&quot;: &quot;^4.3.1&quot;,
    &quot;node-polyfill-webpack-plugin&quot;: &quot;^2.0.1&quot;
  },
  &quot;cypress-cucumber-preprocessor&quot;: {
    &quot;nonGlobalStepDefinitions&quot;: true
  },
  &quot;compilerOptions&quot;: {
    &quot;lib&quot;: [
      &quot;ES2021&quot;
    ],
    &quot;target&quot;: &quot;ES2021&quot;
  }
}
</code></pre>
<p>cypress.config.js</p>
<pre><code>const { defineConfig } = require(&quot;cypress&quot;);
const webpack = require(&quot;@cypress/webpack-preprocessor&quot;);
const preprocessor = require(&quot;@badeball/cypress-cucumber-preprocessor&quot;);
const NodePolyfillPlugin = require(&quot;node-polyfill-webpack-plugin&quot;);


async function setupNodeEvents(on, config) {
  // This is required for the preprocessor to be able to generate JSON reports after each run, and more,
  await preprocessor.addCucumberPreprocessorPlugin(on, config);

  on(
      &quot;file:preprocessor&quot;,
      webpack({
        webpackOptions: {
          plugins: [
            new NodePolyfillPlugin()
          ],
          resolve: {
            //fallback: {&quot;path&quot;: false},
            extensions: [&quot;.ts&quot;, &quot;.js&quot;],
          },
          module: {
            rules: [
              {
                test: /.feature$/,
                use: [
                  {
                    loader: &quot;@badeball/cypress-cucumber-preprocessor/webpack&quot;,
                    options: config,
                  },
                ],
              },
            ],
          },
        },
      })
  );

  // Make sure to return the config object as it might have been modified by the plugin.
  return config;
}
module.exports = defineConfig({
  e2e: {
    specPattern: &quot;**/*.feature&quot;,
    setupNodeEvents,
  },
  &quot;requestTimeout&quot;: 10000,
  &quot;defaultCommandTimeout&quot;:15000,
  &quot;pageLoadTimeOut&quot;:15000,
  &quot;ScreenshotOnRunFailure&quot;: true,
  &quot;trashAssetsBeforeRuns&quot;: true,
  &quot;env&quot;:{
    &quot;login_url&quot;:&quot;https//www.flipkart.com/&quot;
  }
});
</code></pre>
<p>plugins/index.js</p>
<pre><code>module.exports = (on, config) =&gt; {
    // &quot;on&quot; is used to hook into various events Cypress emits
    // &quot;config&quot; is the resolved Cypress config
}
const cucumber = require('cypress-cucumber-preprocessor').default

module.exports = (on, config) =&gt; {
    on('file:preprocessor', cucumber())
}
</code></pre>
<p>The file structure:
<a href=""https://i.stack.imgur.com/N3cf9.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/N3cf9.png"" alt=""enter image description here"" /></a></p>
<p>The loginSteps.js:</p>
<pre><code>import LoginPage from &quot;../page_objects/LoginPage&quot;;
import BasePage from &quot;../page_objects/BasePage&quot;;
import { Given,When,Then,And } from &quot;cypress-cucumber-preprocessor/steps&quot;;
//const { Before, Given, When, Then, And } = require('cypress-cucumber-preprocessor/steps')

const loginPage = new LoginPage();

Given(&quot;Websites URL.&quot;,() =&gt; {
     cy.visit(BasePage.url);
});
When(&quot;User fills Username.&quot;, () =&gt; {
    loginPage.fillField(BasePage.username, &quot;username&quot;);
});
And(&quot;Fills Password.&quot;, () =&gt; {
    loginPage.fillField(BasePage.password, &quot;valami&quot;);
});
And(&quot;Clicks login button.&quot;, () =&gt; {
    loginPage.clickButton(BasePage.loginButton);
});
Then(&quot;The login should be successful.&quot;, () =&gt; {
    loginPage.verifyLogin(LoginPage.img);
});

</code></pre>
<p>The login.feature file:</p>
<pre><code>Feature: Login

  Scenario: Login with good credentials
    Given Websites URL.
    When User fills Username.
    And fills Password.
    And Click's login button.
    Then The login should be successful.
</code></pre>
<p>Thank you very much for your help.</p>
<p>Sorry if the configs are a bit messy this is the first time i'm trying to configure it and I tried many different solutions. Thank you very much for your help.</p>
",https://stackoverflow.com/questions/75524348/cypress-does-not-recognize-step-implementations-in-steps-js-file,"['javascript', 'npm', 'cucumber', 'cypress', 'cypress-cucumber-preprocessor']",162,False,0,0
How to upload image or file using cypress-file-upload,"<p>I am trying to upload an image for E2E testing but could succeed</p>
<p>First of all, I have installed</p>
<p>npm install --save-dev cypress-file-upload</p>
<p>and then using page object model</p>
<p>setting_page.js <a href=""https://i.stack.imgur.com/w8CCs.png"" rel=""nofollow noreferrer"">enter image description here</a></p>
<pre><code>export class SettingPage {

doc_uploadImage=('#fileDocument')

 uploadimage(){
    cy.get(this.uploadimage).attachFile('D:\Cypress(Projects)\Agorz_Automation_Project\cypress\fixtures\images.jpg')}

}
</code></pre>
<p>Demo.js</p>
<pre><code>import { SettingPage } from &quot;./Pages/setting_page&quot;
import 'cypress-file-upload'

const settingpage = new SettingPage()

it.only('upload file', function () {

settingpage.uploadimage()

})



</code></pre>
<p>Error message screen is attached here<a href=""https://i.stack.imgur.com/RgcRK.png"" rel=""nofollow noreferrer"">enter image description here</a></p>
<p>I want to upload an image for testing purposes, you're help will be highly appreciated in this regard.</p>
",https://stackoverflow.com/questions/75020936/how-to-upload-image-or-file-using-cypress-file-upload,"['javascript', 'testing', 'automation', 'cypress', 'image-upload']",308,True,0,3
Run Playwright tests in Azure Devops after the release deployment,"<p>I have an MVC web application that runs the Azure DevOps pipeline for CI and CD, building and deploying on 2 different VMs on Azure.
I'd like to add Playwrite tests for E2E testing for both of these applications once they are deployed on the VMs.
I cannot find any resources that explain this.
So the process should be:</p>
<p>Pipeline - Build</p>
<p>Release - Deploy</p>
<p>Run Playwrite tests in TypeScript</p>
",https://stackoverflow.com/questions/75470972/run-playwright-tests-in-azure-devops-after-the-release-deployment,"['azure-devops', 'continuous-integration', 'playwright', 'cicd', 'playwright-test']",150,False,0,0
How to E2E test on Electron desktop app with Playwright,"<p>I try to write E2E test with playwright but something is wrong.</p>
<p>When I was initialize the test, test passed but actually, block did not go inside the bracket.
It also passes the test when I enter the wrong selector.</p>
<p><em>The code is below:</em></p>
<pre><code>import { _electron as electron } from 'playwright';
import { test, expect, ElectronApplication, Page, BrowserContext, Locator } from '@playwright/test';

test.describe('Add Connection', async() =&gt; {
let electronApp: ElectronApplication;
let firstWindow: Page;
let context: BrowserContext;

    test.beforeAll(async() =&gt; {
        electronApp = await electron.launch({ args: ['.']} );
    
        const appPath = await electronApp.evaluate(async({ app }) =&gt; {
            return app.getAppPath();
        });
        console.log(appPath);
    });
    
    test('Try Connection', () =&gt; {
        electronApp.on('window', async(page) =&gt; {
    
            await page.getByTestId('settings').click({delay: 1000});
            await page.getByTestId('connection').click({delay: 1000});   
    
        });
        
    });
    
    test.afterAll(async() =&gt; {
        await electronApp.close();
    });

});
</code></pre>
<p>I haven't seen enough documentation about E2E testing on Electron. How can we write a test where we can go to different pages by clicking on the buttons?</p>
",https://stackoverflow.com/questions/75218313/how-to-e2e-test-on-electron-desktop-app-with-playwright,"['electron', 'e2e-testing', 'playwright', 'playwright-test']",377,True,0,1
Cypress - Cannot read properties of undefined (reading &#39;_currentRetry&#39;),"<p>I'm having an issue I can't manage to fix with some Cypress tests.</p>
<p>I have the test file &quot;run_tests.cy.js&quot;, that contains the following:</p>
<pre><code>describe('Run tests', () =&gt; {
    it('Run all tests', () =&gt;{
        require('../path/to/test_1.cy.js');
        require('../path/to/test_2.cy.js');
        require('../path/to/test_3.cy.js');
        require('../path/to/test_4.cy.js');
        require('../path/to/test_5.cy.js');
        require('../path/to/test_6.cy.js');
        require('../path/to/test_7.cy.js');
    })
})
</code></pre>
<p>And I have a custom script in my <code>package.json</code> file:</p>
<pre><code>&quot;cy:run:test&quot;: &quot;cypress run --browser chromium --config baseUrl=https://google.com/ --spec './cypress/e2e/path/to/run_tests.cy.js'&quot;,
</code></pre>
<p>When I run the test manually, aka <code>npx cypress open</code>, selecting E2E testing, selecting chromium and selecting the test. It works as intended (the test works)</p>
<p>The problem is when I try and run my custom script <code>npm run cy:run:test</code> I get the following error:</p>
<pre><code>Cannot read properties of undefined (reading '_currentRetry')
TypeError: Cannot read properties of undefined (reading '_currentRetry')
    at E.&lt;anonymous&gt; (&lt;embedded&gt;:4644:13577)
    at E.parseArgs (&lt;embedded&gt;:4644:16785)
    at E.emit (&lt;embedded&gt;:4644:16602)
    at Object.onMocha (&lt;embedded&gt;:4691:427158)
    at p.&lt;anonymous&gt; (&lt;embedded&gt;:4691:68249)
    at p.emit (node:events:527:28)
    at p.emitUntyped (&lt;embedded&gt;:4402:84346)
    at &lt;embedded&gt;:4402:91863
    at process.processTicksAndRejections (node:internal/process/task_queues:78:11)
</code></pre>
<p>Any idea what I can do to fix this issue?</p>
",https://stackoverflow.com/questions/76282024/cypress-cannot-read-properties-of-undefined-reading-currentretry,"['cypress', 'test-runner']",46,True,1,1
Cypress component testing not working with create-t3-app,"<p>I have a project that was created with create-t3-app@latest. When I attempt to setup component testing with Cypress it throws an error saying invalid environment variables, it's attempting to use the src/env.mjs file.</p>
<p>I've tried to use cypress.env.json and the env variables in cypress.config.ts to override it but the error is persisting. E2E testing does not throw this error just component testing. Any ideas/suggestions or will I have to use a different testing library? thanks</p>
",https://stackoverflow.com/questions/75843115/cypress-component-testing-not-working-with-create-t3-app,"['next.js', 'cypress', 't3-app']",99,True,0,1
How to make SignalR E2E tests faster,"<p>I'm E2E testing my ASP.NET Web Api project with <code>WebApplicationFactory&lt;Program&gt;</code>, and, for &quot;normal&quot; http endpoints (Controllers), it's pretty fast, as it should be, since it's all in the same computer.</p>
<p>However, now I've to include some tests for a SignalR hub in there.</p>
<p>After googling a bit, this was the approach I used:</p>
<pre class=""lang-cs prettyprint-override""><code>var hubConnection = new HubConnectionBuilder()
    .WithUrl(_factory.Server.BaseAddress + &quot;hub&quot;,  options =&gt;
    {
        options.AccessTokenProvider = () =&gt; Task.FromResult(responseDict?[&quot;token&quot;]);
        options.HttpMessageHandlerFactory = _ =&gt; _factory.Server.CreateHandler();
    })
    .AddJsonProtocol(options =&gt;
    {
        options.PayloadSerializerOptions.Converters.Add(new JsonStringEnumConverter());
    })
    .Build();


await hubConnection.StartAsync();
</code></pre>
<p>However, I've noticed that this is very slow, like hubConnection.StartAsync() takes about 4 seconds to reach my OnConnectedAsync method on the hub.</p>
<p>Is there someway to make it faster? Maybe this approach that I've taken of using a HttpMessageHandlerFactory has some unnecessary overhead?</p>
",https://stackoverflow.com/questions/75913554/how-to-make-signalr-e2e-tests-faster,"['asp.net-core', '.net-core', 'signalr', 'e2e-testing', 'signalr.client']",38,False,1,0
How do I unblock Firefox cookies with Codeceptjs?,"<p>I want to do E2E testing of Salesforce in codeceptjs using the latest version of Firefox (as of March 2023), however operations that were possible with the old version of Firefox (84.0.2) cannot be performed with the latest version. I expect the cause is that cookies are blocked in the following settings.</p>
<p>Firefox Settings:</p>
<p><a href=""https://i.stack.imgur.com/kWe8b.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/kWe8b.png"" alt=""Firefox Settings"" /></a></p>
<p>If cookies are blocked as described above, the following statement will appear when displaying visualforce and the screen will not be displayed.</p>
<pre class=""lang-none prettyprint-override""><code>ブラウザがクロスドメインの cookie をブロックしているため、このページを表示できません。
サポートされている別のブラウザでもう一度お試しください。
(Your browser is blocking cross-domain cookies, so this page cannot be displayed. 
Please try again with a different browser that is supported.)
</code></pre>
<p>However the test must always be run on the latest Firefox.</p>
<p>Software versions:</p>
<p>codeceptjs 3.3.7<br />
geckodriver - v0.19.0<br />
Firefox 110.0.1<br />
OS: Windows 11</p>
",https://stackoverflow.com/questions/75730597/how-do-i-unblock-firefox-cookies-with-codeceptjs,"['salesforce', 'codeceptjs']",25,False,0,0
How to unit test with Flutter WEB as target platform,"<p>Flutter provides a number of way to test Widgets and to do e2e testing. Things I know of:</p>
<ol>
<li>flutter test</li>
<li>flutter drive (seems to be deprecated)</li>
<li><code>package:integration_test</code> based testing <a href=""https://docs.flutter.dev/testing/integration-tests"" rel=""nofollow noreferrer"">https://docs.flutter.dev/testing/integration-tests</a></li>
</ol>
<p><code>flutter test --platform=chrome</code> is deprecated and seems to warn users that it can be removed at any point. This is too bad because that would remove my ability to run <strong>unit test</strong> on web platform easily.</p>
<p>Starting a chromedriver feels overkill to just run unit tests.</p>
<h2>Question:</h2>
<p>So what is the consensus nowadays, when you are testing functionality and business logic on web, how do you go about it (no widgets)?</p>
",https://stackoverflow.com/questions/75823345/how-to-unit-test-with-flutter-web-as-target-platform,"['flutter', 'unit-testing']",40,False,0,0
Making horizontal swipe in Playwright with Tab (HeadlessUI NextJs),"<p>Hi I'm fairly new to e2e testing so one of the features I wanna test for mobile version in Playwright is horizontal swiping. On the mobile version I only have 1 product image displayed and user on mobile can swipe right to check other images of that product. But whatever I tried failed also when I open in headed mode its resized to mobile view but it isnt selected (Im not sure if this is the right terminology) where I cant have mobile gestures such as touch screen swiping to the left and right. Is there a way to do such a thing, thanks in advance :)</p>
",https://stackoverflow.com/questions/75814051/making-horizontal-swipe-in-playwright-with-tab-headlessui-nextjs,"['next.js', 'playwright', 'headless-ui']",57,False,0,0
Check props value from a component (ReactJS) inside of Playwright,"<p>I'm fairly new to E2E testing. One of the things I want to test is when I change the shipping address I also want to set it to the billing address.</p>
<p>For instance, if I set Grove Street as my shipping address in the input field I also want it to be the same for the billing address.</p>
<p>Is there a way for me to check the billing address as well as the shipping address that way?</p>
<p>Here is my component:</p>
<pre><code>const Delivery: React.FC&lt;DeliveryProps&gt; = ({ data}) 
</code></pre>
<p>and that data is modeled like this</p>
<pre><code>data = {
  ...some other data
  shippingAddress: string;
  billingAddress: string;
}
</code></pre>
<p>I would like to fill the address field like so:</p>
<pre><code>await checkout.verifyAddressInputField(page).fill('Grove street');
</code></pre>
<p>And to check the props value of my whole component, specifically the data props <code>shippingAddress</code> and <code>billingAddress</code>.</p>
",https://stackoverflow.com/questions/76055298/check-props-value-from-a-component-reactjs-inside-of-playwright,"['javascript', 'reactjs', 'testing', 'playwright']",89,True,2,1
"end to end testing React, puppeteer serve command fails","<p>I am following the tutorial react e2e testing.</p>
<p><a href=""https://blog.logrocket.com/end-to-end-testing-react-jest-puppeteer/#:%7E:text=To%20run%20the%20end%2Dto,%2Dscripts%20test%20%2D%2DtestPathIgnorePatterns%3D"" rel=""nofollow noreferrer"">https://blog.logrocket.com/end-to-end-testing-react-jest-puppeteer/#:~:text=To%20run%20the%20end%2Dto,%2Dscripts%20test%20%2D%2DtestPathIgnorePatterns%3D</a>.</p>
<p>I get stuck in the line serve -s build<a href=""https://i.stack.imgur.com/0LS8c.png"" rel=""nofollow noreferrer"">serve command not working</a> as shown in the attached image.</p>
<pre><code>C:\tutorials\react-puppeteer&gt;yarn global add serve
yarn global v1.22.19
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Installed &quot;serve@14.1.2&quot; with binaries:
      - serve
Done in 0.81s.

C:\tutorials\react-puppeteer&gt;serve -s build
'serve' is not recognized as an internal or external command,
operable program or batch file.
</code></pre>
<p>I am using windows 11 with vscode as my ide. My node version is 16.19.0. '</p>
<p>I have tried another stack overflow suggest which said using &quot;npx serve -s&quot; instead of &quot;serve -s build&quot; with no success.
<a href=""https://stackoverflow.com/questions/55815956/serve-is-not-recognized-as-an-internal-or-external-command-to-run-react-app"">&#39;serve&#39; is not recognized as an internal or external command to run react app</a></p>
<p>I was expecting that the server will run on localhost:5000 but that did not happen.</p>
",https://stackoverflow.com/questions/74987316/end-to-end-testing-react-puppeteer-serve-command-fails,"['reactjs', 'puppeteer', 'e2e-testing']",25,False,0,0
Cypress intercepts: set/clear per-suite not per-test,"<p>I have a Cypress (<code>12.9.0</code>) setup for E2E testing, where every file in the <code>e2e</code> folder is a single e2e scenario with one <code>describe()</code> and many <code>it()</code> tests.</p>
<p>Each scenario and its tests all rely on a number of <code>intercept()</code> stubs (same stubs for every scenario) and do not need to reset between each <code>it()</code> test - I want them to be set once for the suite.</p>
<p>I had thought that setting the <code>testIsolation</code> config value to <code>false</code> would do this, but it seems like that does not prevent the intercept stubs from getting cleared - it only <a href=""https://docs.cypress.io/guides/core-concepts/test-isolation#Quick-Comparison"" rel=""nofollow noreferrer"">preserves the browser context</a>.</p>
<p>Is there a way to accomplish this, to prevent having to re-create <code>intercept()</code> mocks for every test and instead be able to create them just once per test-suite (<code>describe()</code>)?</p>
",https://stackoverflow.com/questions/75962175/cypress-intercepts-set-clear-per-suite-not-per-test,"['testing', 'cypress', 'ui-automation', 'cypress-intercept']",68,True,1,1
How do you test the SwiftUI views?,"<p>I am building a SwiftUI application to manage movies. I am using MVVM approach for SwiftUI and I ended up with the following unit test for my View model to verify that the validation is working and the message is displayed on the screen, when the TextField is empty. I wrote the following test.</p>
<pre><code>   func testExample() throws {
            
            let vm = AddMovieViewModel()
            vm.title = &quot;&quot;
            vm.year = &quot;&quot;
            vm.addMovie()
           
            XCTAssertEqual(vm.message, &quot;Error occurred.&quot;)
        }
</code></pre>
<p>But I have a feeling that this test is not doing much and it is testing the implementation details instead of the behavior. If I refactor the addMovie to saveMovie without changing the implementation then the test will fail. Even though the behavior has not changed.</p>
<p>For SwiftUI, how do you test the UI? Few options I have heard are</p>
<ul>
<li>Manual testing using Xcode Previews</li>
<li>ViewInspector</li>
<li>E2E Testing to test the complete story instead of just the behavior.</li>
</ul>
<p>Thoughts!</p>
",https://stackoverflow.com/questions/75304954/how-do-you-test-the-swiftui-views,"['ios', 'swiftui']",81,False,0,0
How To Setup MongoDB Memory Server In NestJS for E2E Testing?,"<h2>What I want</h2>
<p>I'm looking to integrate mongodb-memory-server in my E2E testing within NestJS.  I noticed that I need a mongodb instance to work with supertest, but I would like to not depend on an external database and would rather have the mongodb server in-memory.</p>
<h2>Problem</h2>
<p>I tried setting up mongodb-memory-server in my E2E test suite, but a couple of my tests it getting back a <strong>500 Internal Server Error</strong> when the expected status code is supposed to be 201.  Here is my code:</p>
<p><code>drive.e2e-spec.ts</code></p>
<pre class=""lang-js prettyprint-override""><code>import { HttpStatus, INestApplication } from '@nestjs/common';
import { getModelToken } from '@nestjs/mongoose';
import { Test, TestingModule } from '@nestjs/testing';
import { Types, Model } from 'mongoose';
import * as request from 'supertest';

import { AppModule } from '#app.module';
import { CreateDriveDto } from '#drive/dto/create-drive.dto';
import { Drive, DriveDoc } from '#drive/schema/drive.schema';
import {
  closeInMongodConnection,
  rootMongooseTestModule,
} from 'test/util/MongooseTestModule';
import { dataFromJoi } from 'test/util/generate-valid-sample-data';
import { configTestApp } from 'test/util/setup-test-app';

const route = `/api/test/v2/drive`;

// generate valid sample data from Joi schema
const validCreateData = dataFromJoi(CreateDriveDto);

let moduleFixture: TestingModule;
let app: INestApplication;
let mockDriveModel: Model&lt;DriveDoc&gt;;

beforeAll(async () =&gt; {
  moduleFixture = await Test.createTestingModule({
    imports: [AppModule, rootMongooseTestModule()],
  }).compile();

  app = moduleFixture.createNestApplication();
  mockDriveModel = moduleFixture.get&lt;Model&lt;DriveDoc&gt;&gt;(
    getModelToken(Drive.name),
  );
  configTestApp(app);
  await app.init();
});

afterEach(async () =&gt; {
  await closeInMongodConnection();
});

afterAll(async () =&gt; {
  await app.close();
});

describe(`Integration Test :: Route ${route}`, () =&gt; {
  describe(`POST`, () =&gt; {
    test('Return 400 if request is invalid', async () =&gt; {
      await request(app.getHttpServer())
        .post(route)
        .send({})
        .expect(HttpStatus.BAD_REQUEST)
        .then((res) =&gt; {
          expect(res.body).toHaveProperty('statusCode');
          expect(res.body).toHaveProperty('message');
        });
    });

    test('Return 201 and create new entry if request is valid', async () =&gt; {
      await request(app.getHttpServer())
        .post(route)
        .send(validCreateData)
        .expect(HttpStatus.CREATED);
    });
  });

  describe(`GET`, () =&gt; {
    test('Return 200 and an array', async () =&gt; {
      const doc = await mockDriveModel.create(validCreateData);
      await request(app.getHttpServer())
        .get(route)
        .expect(HttpStatus.OK)
        .then((res) =&gt; {
          expect(Array.isArray(res.body)).toBeTruthy();
        });
    });
  });
});
</code></pre>
<p><code>MongooseTestModule.ts</code></p>
<pre class=""lang-js prettyprint-override""><code>import { MongooseModule, MongooseModuleOptions } from '@nestjs/mongoose';
import { MongoMemoryServer } from 'mongodb-memory-server';
import { disconnect } from 'mongoose';

let mongod: MongoMemoryServer;

export const rootMongooseTestModule = (options: MongooseModuleOptions = {}) =&gt;
  MongooseModule.forRootAsync({
    useFactory: async () =&gt; {
      mongod = await MongoMemoryServer.create();
      const mongoUri = mongod.getUri();
      return {
        uri: mongoUri,
        ...options,
      };
    },
  });

export const closeInMongodConnection = async () =&gt; {
  await disconnect();
  if (mongod) await mongod.stop();
};
</code></pre>
<h2>Discussion</h2>
<p>The implementation that should be focused on is the <code>rootMongoseTestModule</code>, which is where mongodb-memory-server would be instantiated.  Setup doesn't seem to work. Any thoughts or advice?  I am also open to other testing strategies as well.  Thanks in advance!</p>
",https://stackoverflow.com/questions/76222539/how-to-setup-mongodb-memory-server-in-nestjs-for-e2e-testing,"['mongodb', 'testing', 'mongoose', 'nestjs']",101,False,0,0
Inconsistent formatting of numbers (toLocaleString) when executing testcafe-e2e tests inside docker-image,"<p>I am using the testcafe docker image for e2e-testing react components.
When using <code>Number.prototype.toLocaleString</code> I am not receiving the expected results for different locales I am testing with.</p>
<p><em>Local test:</em>
<a href=""https://i.stack.imgur.com/yIvVb.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/yIvVb.png"" alt=""Test running on local machine"" /></a></p>
<p><em>Container test:</em></p>
<p><a href=""https://i.stack.imgur.com/wlWAv.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/wlWAv.png"" alt=""Test running in container"" /></a></p>
<p>As you can see the outcome is inconsistent and the containered test run does not seem to properly apply the localization.</p>
<p>Since this oddity can be reproduced with chromium and firefox I am suspecting that the problem derives from the system level.</p>
<p>I could hardly find any information about browser related issues when using them inside a alpine-linux based container.</p>
<p>I stumbled upon this article <a href=""https://grrr.tech/posts/2020/add-locales-to-alpine-linux-docker-image/"" rel=""nofollow noreferrer"">https://grrr.tech/posts/2020/add-locales-to-alpine-linux-docker-image/</a> but the issue cannot be redeemed:
I created a new image from testcafe/testcafe:latest with the mentioned steps an made sure <code>locale</code> was available.
Still numbers and dates are not formatted consistently.</p>
",https://stackoverflow.com/questions/75018254/inconsistent-formatting-of-numbers-tolocalestring-when-executing-testcafe-e2e,"['javascript', 'testing', 'automated-tests', 'testcafe', 'alpine-linux']",75,False,0,0
Cypress Before hook executing multiple times per test?,"<p>I'm doing some e2e testing with cypress and ran into an issue with before hooks. I am testing multiple pages with the same test but different variables. As such i have wrapped my tests within a function so that i can loop over the function for every test i need to run. At the top of my function i have a before hook which should execute once before all tests in the function, but instead it executes for each iteration of the function. I.e running my function 10 times causes the before hook to run 10 times every time i run my function.</p>
<p>Here is an MRE which is structured in the same way im running my tests:</p>
<pre><code>function runTests(index) {

    before(() =&gt; {
        cy.visit('https://google.com')
    })

    describe('Tests some stuff', () =&gt; {
        describe(('Tests some stuff'), () =&gt; {
            it('Tests some stuff', () =&gt; {
                cy.log(index)
            })
        })

    })
}
  
for (let i = 0; i &lt; 10; i++) {
  runTests(i)
}
</code></pre>
<p>I am expecting this to visit google once before each test and then print out the current iteration of the function. Instead it is visiting google 10 times before printing the iteration.</p>
",https://stackoverflow.com/questions/75756531/cypress-before-hook-executing-multiple-times-per-test,"['for-loop', 'testing', 'cypress', 'e2e-testing']",76,False,1,0
How to configure Cypress component testing when Cypress is installed outside the Frontend project,"<p>I have a Frontend App for that I am using cypress e2e testing.
The structure of this is : a folder with the (Angular) FE app; and outside this, another folder with the cypress installation. In my env file I set the deployed version app on which I am executing my e2e tests against (not localhost).
I've tried to install the cypress component testing libraries but those seem not to have access to the FE app files since the cypress folder install is placed outside of the FE app one. Is there any possibility to tweak this somehow?</p>
<p>(note that I cannot change the installation cypress folder to be inside the FE app)</p>
<p>I've tried the installation from here: <a href=""https://docs.cypress.io/guides/component-testing/angular/overview"" rel=""nofollow noreferrer"">https://docs.cypress.io/guides/component-testing/angular/overview</a></p>
<p>The error I am having is: import {mount} from 'cypress/angular' (cypress/angular not accessible)</p>
<p>I am using cypress 10.11.0
Node -v: 18.14.1</p>
",https://stackoverflow.com/questions/76162490/how-to-configure-cypress-component-testing-when-cypress-is-installed-outside-the,"['cypress-testing-library', 'angular-e2e', 'cypress-component-test-runner']",30,False,0,0
How to get code coverage report from manual testing in Angular,"<p>After going through many articles and blogs, I am not able to find a way to get a code coverage report for manual/e2e testing in istanbul.</p>
<p>I have created a normal build using <code>ng build --output-hashing none --output-path=../mysomeotherfolder/dist</code></p>
<p>Now in ./mysomeotherfolder folder I am using this command to instrument the code</p>
<p><code>nyc instrument dist/ dist/ --exclude-after-remap=false --complete-copy --in-place</code></p>
<p>After running the application I am getting JSON from window.__coverage. I am creating report from this json using this command</p>
<p><code>nyc report --reporter=lcov --report-dir=coverage-output</code></p>
<p>I am getting the list of componets name with <code>webpack:/</code> word appending.</p>
<p>Example: webpack:/src/app/my-component-name</p>
<p>But when I am trying to navigate it to it, it just refresh the page. ( not navigate)</p>
<p>I also tried to copy the HTML file path of my component in <code>coverage-output/lcov-report/webpack:</code> by navigating from file explorer and run on the browser.
There also I am getting error like</p>
<p><code>Unable to lookup source: /var/www/mysomeotherfolder/dist/webpack:/src/somefolder/any-component.ts</code></p>
<p>What should I do now after this? Can anybody please suggest something? Or at least I need to know is it possible to achieve what I am expecting?</p>
",https://stackoverflow.com/questions/75517122/how-to-get-code-coverage-report-from-manual-testing-in-angular,"['javascript', 'angular', 'typescript', 'code-coverage', 'istanbul']",81,False,0,0
How do I add and use Chrome Extensions with Cypress.io programmatically,"<p>How do I add and use Chrome Extensions with Cypress.io <em>programmatically</em>?</p>
<p>Close to duplicating <a href=""https://stackoverflow.com/questions/55400537/how-do-i-add-and-use-chrome-extensions-with-cypress-io"">this</a> but solution cannot be manual.</p>
<p>I'm running <code>npx cypress open</code>, clicking &quot;E2E Testing&quot;, then clicking &quot;Chrome v112&quot;, then running my spec.</p>
<p>The extension is not modifying the page or appearing in chrome://extensions</p>
<p>I have tried manually adding my extension to Cypress chrome as <a href=""https://stackoverflow.com/questions/55400537/how-do-i-add-and-use-chrome-extensions-with-cypress-io"">mentioned here</a></p>
<p>But I would like to do it programmatically so I can use it in github workflows etc.</p>
<p>I see one answer that points to the <a href=""https://docs.cypress.io/api/plugins/browser-launch-api#Usage"" rel=""nofollow noreferrer"">docs</a> and I have copied it to <code>cypress.config.ts</code> (and replaced the path with the one that works when loading manually). But the extension doesn't load on my page when I call <code>cy.visit()</code> in Cypress and isn't listed in chrome://extensions within Cypress Chrome.</p>
<p>I also notice the docs say:
<code>launchOptions.extensions.push('Users/jane/path/to/extension')</code>
which is missing the beginning <code>/</code>. I'm not sure if that's intentional so I have tried both with and without it.</p>
<p>Would love to hear any suggestions!</p>
",https://stackoverflow.com/questions/76159102/how-do-i-add-and-use-chrome-extensions-with-cypress-io-programmatically,"['testing', 'google-chrome-extension', 'automated-tests', 'cypress']",25,False,0,0
Cypress Auth0 authentication,"<p>I have a NextJS application that uses Auth0 for authorization. I am trying to write Cypress tests for e2e testing, but I am having trouble with logging in via Auth0. I have followed the documentaion on <a href=""https://docs.cypress.io/guides/end-to-end-testing/auth0-authentication"" rel=""nofollow noreferrer"">Cypress Documentation</a> for both &quot;Login with cy.origin()&quot; and &quot;programmatic login&quot;. Both of these have given me two bugs that I can't get around.</p>
<p>Programmatic login:</p>
<p>Here is my definition of the custom command</p>
<pre><code>/// &lt;reference types=&quot;cypress&quot; /&gt;

import jwt from 'jsonwebtoken'

Cypress.Commands.add('loginByAuth0Api', (username: string, password: string) =&gt; {
  cy.log(`Logging in as ${username}`)
  const client_id = Cypress.env('TENANT_CLIENT_ID')
  const client_secret = Cypress.env('TENANT_CLIENT_SECRET')
  const audience = Cypress.env('TENANT_AUDIENCE')
  const scope = 'openid email profile'

  cy.request({
    method: 'POST',
    url: `${Cypress.env('TENANT_DOMAIN')}/oauth/token`,
    body: {
      grant_type: 'password',
      username,
      password,
      audience,
      scope,
      client_id,
      client_secret
    }
  }).then(({ body }) =&gt; {
    const claims = jwt.decode(body.id_token)
    const { nickname, name, picture, updated_at, email, email_verified, sub, exp } = claims

    const item = {
      body: {
        ...body,
        decodedToken: {
          claims,
          user: {
            nickname,
            name,
            picture,
            updated_at,
            email,
            email_verified,
            sub
          },
          audience,
          client_id
        }
      },
      expiresAt: exp
    }

    window.localStorage.setItem('auth0Cypress', JSON.stringify(item))
  })
})

declare global {
  namespace Cypress {
    interface Chainable {
      loginByAuth0Api(email: string, password: string): Chainable&lt;void&gt;
    }
  }
}

export {}

</code></pre>
<p>Here is my implementation of the command, and the cypress test that is run:</p>
<pre><code>describe('Auth0', () =&gt; {
  it('should login', () =&gt; {
    cy.loginByAuth0Api(Cypress.env('TENANT_EMAIL'), Cypress.env('TENANT_PASSWORD'))
    cy.visit('localhost:3000/')
  })
})

export {}

</code></pre>
<p>The issue that I am having, is that the application's session is not set. When cypress visits localhost:3000/, it should display the page, but if a user is not logged in (i.e. there is not active session), then it gets redirected to /login. When the test is run, cypress redirects to /login, which should not happen.</p>
<p>Login with cy.origin():</p>
<p>When logging in with cy.origin(), cypress redirects to the login page as well. However, if I get cypress to click on the sign in button again, it will go the correct page! This seems good at first, but when clicking around on other pages, the session is not actually set.</p>
<p>Thank you for your time</p>
",https://stackoverflow.com/questions/75866773/cypress-auth0-authentication,"['next.js', 'cypress', 'auth0', 'e2e']",173,False,1,1
How to set Spring active profile programatically in my test class?,"<p>I have a springBoot test class that I want to run with two different profiles which can be switched ideally through the build.gradle or using profiles.
I am using @ActiveProfiles annotation to specify which spring profile to use for testing. I want to switch between two different test profiles based on whether I want e2e testing or not, without having to make a code change every time. I tried using a resolver but it always sets to ITPRofile.
Here is the annotation:</p>
<pre><code>`@ActiveProfiles(value = &quot;ITProfile&quot;, resolver = SystemPropertyActiveProfileResolver.class)
`
</code></pre>
<p>Here is the resolver:</p>
<pre><code>`public class SystemPropertyActiveProfileResolver implements ActiveProfilesResolver {

  private final DefaultActiveProfilesResolver defaultActiveProfilesResolver =
      new DefaultActiveProfilesResolver();

  @Override
  public String[] resolve(Class&lt;?&gt; testClass) {
    final String springProfileKey = &quot;spring.profiles.active&quot;;
    return System.getProperties().containsKey(springProfileKey)
        ? System.getProperty(springProfileKey).split(&quot;\\s*,\\s*&quot;)
        : defaultActiveProfilesResolver.resolve(testClass);
  }
}`
</code></pre>
<p>When I evaluate System.getProperties() it doesn't have any key value pair for spring.profiles.active. How can I make the property available to the resolver? Without the activeProfiles annotation the profile in my test class is simply set to be the one in my application.yml</p>
<p>I tried setting spring.profiles.active in my build.gradle, but it doesn't look like it is picked by the springboot test class.
I tried printing <code>System.getProperty(&quot;spring.profiles.active&quot;)</code> in the resolver but it was null.
I tried printing <code>System.getenv()</code> but there was no key corresponding to an active profile
How can I make the resolver set the correct profile? Where should I be defining it?</p>
",https://stackoverflow.com/questions/76057394/how-to-set-spring-active-profile-programatically-in-my-test-class,"['java', 'spring-boot', 'integration-testing']",62,False,1,1
"Selenium, Cucumber and Java in IntelliJ: Replace Junit with TestNG","<p>I've got a large Maven project with an e2e-testing project included. The project and architecture is not created by me, but I've been using it for a while.</p>
<p>The project uses Cucumber for .feature files, and Java test definition files. Then an architecture of PO-objects and other classes &quot;below&quot; that.</p>
<p>Now, I'm sure the project uses Junit. But since I'm only working with the Selenium tests and not any unit or api tests, I'm not too sure about the underlying architecture.</p>
<p>My test runner file apparently uses JUnit:</p>
<pre><code>import io.cucumber.junit.CucumberOptions;
import io.cucumber.junit.Cucumber;
import e2e.support.Hooks;
import lombok.extern.slf4j.Slf4j;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import java.util.Set;

@Slf4j
@RunWith(Cucumber.class)
@CucumberOptions(
    plugin   = { &quot;pretty&quot;, &quot;json:target/cucumber.json&quot;, &quot;html:target/cucumber-html-report&quot; },
    tags = { &quot;~@integrasjon&quot;, &quot;~@Ignore&quot;, &quot;~@ToggledOff&quot;, &quot;~@Kjent_feil&quot; },
    features = { &quot;src/test/resources/features&quot; })
</code></pre>
<p>public class CucumberTest {</p>
<pre><code>@BeforeClass
public static void setup() {

...and so on...
</code></pre>
<p>It possible to replace Junit as a test runner for the Cucumber/Selenium tests?</p>
<p>I've added the Maven dependencies in the pom.xml file for the e2e-test project. But since the only thing I do when running tests manually is select &quot;Run&quot; or &quot;Debug&quot; from the Cucumber feature file, I'm in the dark with regards to the connections between that and Junit/TestNG.</p>
<p>All hints or pointers are appreciated. I've found some help online, but that was an example of creating a new project - and in Eclipse - which made it a bit difficult to identify exactly what I need to pick.</p>
",https://stackoverflow.com/questions/76014984/selenium-cucumber-and-java-in-intellij-replace-junit-with-testng,"['selenium-webdriver', 'intellij-idea', 'junit', 'cucumber', 'testng']",56,False,0,0
How to test Nextjs App entire stack with msw,"<p>I have a Next app.
I want to test E2E with mock apis (MSW), because I want fast tests that don't depend on third-parties to succeed.</p>
<p><strong>Let's imagine we have a stack like this :</strong> HomePage &gt; click on Button &gt; action.ts &gt; axios.post('hostName/api/action') &gt; api/action.ts &gt; axios.post('third-party') [MSW mock] &gt; bubble up &gt; expect(somethingHappenedInHomePage)</p>
<p>I imagined many solutions to test it:</p>
<p><strong>Solution 1 : Cypress, MSW</strong></p>
<ul>
<li>There are some solutions on internet but they look wobbly (to set up msw in cypress)</li>
<li>Cypress tests are slow</li>
<li>I don't care to run it in Chrome (cypress does ?)</li>
<li>Cypress is commonly though as a E2E testing framework, therefore people don't like to mock third-parties.</li>
</ul>
<p><strong>Solution 2 :Testing-Library/react, jest and msw (using nextJest)</strong></p>
<ul>
<li>This is fast</li>
<li>I can't get it do work
<ul>
<li>env=jsdom I can't have axios even calling the app connect ECONNREFUSED 127.0.0.1:3000</li>
<li>env=node I can't have access to document/window (which are necessary to render components)</li>
</ul>
</li>
</ul>
<p>The trick here is to be able to component test while at the same time, running the entire stack (which requires node generally). Maybe I could also pre-start my app before running the test ?</p>
",https://stackoverflow.com/questions/75595285/how-to-test-nextjs-app-entire-stack-with-msw,"['next.js', 'jestjs', 'msw', 'e2e']",36,False,0,0
cypress 12.13.0 webpack compilation error when accessing import.meta using ts-loader,"<p>Webpack compilation error in Cypress when using import.meta.</p>
<p>I'm using Vue 3, typescript and Quasar 2 framework with vite build tool and Cypress 12.13.0 as e2e testing tool.
I Quasar 2 I got 2 boot files, one for axios, one for authorization. Everything works fine when starting the quasar devServer or build the application using vite build tool.
When I start the e2etests implemented in Cypress, that does the build using webpack I get an error in my auth.ts boot file when trying to access import.meta. In my axios boot file I'm accessing import.meta and it works fine. I can't figure out the differences but I suspect it has something to do with the modules I import that have implications on the transpile of the code from typescript to javascript. Here is the Cypress error when starting a test:</p>
<pre><code>    Error: Webpack Compilation Error
    ./src/boot/auth.ts 4:29
    Module parse failed: Unexpected token (4:29)
    File was processed with these loaders:
     * ../../.cache/Cypress/12.13.0/Cypress/resources/app/node_modules/@packages/server/node_modules/ts-loader/index.js
    You may need an additional loader to handle the result of these loaders.
    | import { WebStorageStateStore } from 'oidc-client';
    | import { createOidcAuth, SignInType, LogLevel } from 'vue-oidc-client/vue3';
    &gt; console.log('xxxxxxx', import.meta.env);
    | const appRootUrl = (new URL(import.meta.url)).origin.concat('/');
    | const identityProvider = import.meta.env.VITE_MIRA_OIDC_AUTHORITY;
     @ ./test/cypress/support/commands.ts 31:0-40 47:4-13 51:4-13 55:4-13 59:4-13
     @ ./test/cypress/support/e2e.ts
        at Watching.handle [as handler] (/data/xxxxxxx/.cache/Cypress/12.13.0/Cypress/resources/app/node_modules/@packages/server/node_modules/@cypress/webpack-preprocessor/dist/index.js:212:23)
        at /data/xxxxxxx/.cache/Cypress/12.13.0/Cypress/resources/app/node_modules/webpack/lib/Watching.js:99:9
        at AsyncSeriesHook.eval [as callAsync] (eval at create (/data/xxxxxxx/.cache/Cypress/12.13.0/Cypress/resources/app/node_modules/tapable/lib/HookCodeFactory.js:33:10), &lt;anonymous&gt;:6:1)
        at AsyncSeriesHook.lazyCompileHook (/data/xxxxxxx/.cache/Cypress/12.13.0/Cypress/resources/app/node_modules/tapable/lib/Hook.js:154:20)
        at Watching._done (/data/xxxxxxx/.cache/Cypress/12.13.0/Cypress/resources/app/node_modules/webpack/lib/Watching.js:98:28)
        at /data/xxxxxxx/.cache/Cypress/12.13.0/Cypress/resources/app/node_modules/webpack/lib/Watching.js:73:19
        at Compiler.emitRecords (/data/xxxxxxx/.cache/Cypress/12.13.0/Cypress/resources/app/node_modules/webpack/lib/Compiler.js:499:39)
        at /data/xxxxxxx/.cache/Cypress/12.13.0/Cypress/resources/app/node_modules/webpack/lib/Watching.js:54:20
        at /data/xxxxxxx/.cache/Cypress/12.13.0/Cypress/resources/app/node_modules/webpack/lib/Compiler.js:485:14
        at AsyncSeriesHook.eval [as callAsync] (eval at create (/data/xxxxxxx/.cache/Cypress/12.13.0/Cypress/resources/app/node_modules/tapable/lib/HookCodeFactory.js:33:10), &lt;anonymous&gt;:6:1)
        at AsyncSeriesHook.lazyCompileHook (/data/xxxxxxx/.cache/Cypress/12.13.0/Cypress/resources/app/node_modules/tapable/lib/Hook.js:154:20)
        at /data/xxxxxxx/.cache/Cypress/12.13.0/Cypress/resources/app/node_modules/webpack/lib/Compiler.js:482:27
        at /data/xxxxxxx/.cache/Cypress/12.13.0/Cypress/resources/app/node_modules/neo-async/async.js:2818:7
        at done (/data/xxxxxxx/.cache/Cypress/12.13.0/Cypress/resources/app/node_modules/neo-async/async.js:3522:9)
        at AsyncSeriesHook.eval [as callAsync] (eval at create (/data/xxxxxxx/.cache/Cypress/12.13.0/Cypress/resources/app/node_modules/tapable/lib/HookCodeFactory.js:33:10), &lt;anonymous&gt;:6:1)
        at AsyncSeriesHook.lazyCompileHook (/data/xxxxxxx/.cache/Cypress/12.13.0/Cypress/resources/app/node_modules/tapable/lib/Hook.js:154:20)
        at /data/xxxxxxx/.cache/Cypress/12.13.0/Cypress/resources/app/node_modules/webpack/lib/Compiler.js:464:33
        at /data/xxxxxxx/.cache/Cypress/12.13.0/Cypress/resources/app/node_modules/@packages/server/node_modules/graceful-fs/graceful-fs.js:143:16
        at /data/xxxxxxx/.cache/Cypress/12.13.0/Cypress/resources/app/node_modules/@packages/server/node_modules/graceful-fs/graceful-fs.js:143:16
        at /data/xxxxxxx/.cache/Cypress/12.13.0/Cypress/resources/app/node_modules/@packages/server/node_modules/graceful-fs/graceful-fs.js:61:14
        at FSReqCallback.oncomplete (node:fs:192:23)
</code></pre>
<p>This is the axios.ts boot files start where import.meta works fine:</p>
<pre><code>    import { boot } from 'quasar/wrappers';
    import axios, { AxiosInstance } from 'axios';
    
    declare module '@vue/runtime-core' {
      interface ComponentCustomProperties {
        $axios: AxiosInstance;
      }
    }
    const api = axios.create({
      baseURL: import.meta.env.VITE_MIRA_API_URI,
      responseType: 'json',
      headers: {
        Accept: 'application/json',
        'Content-Type': 'application/json',
        charset: 'utf-8',
      },
    });
</code></pre>
<p>This is the auth.ts boot files start where import.meta fails:</p>
<pre><code>    import { boot } from 'quasar/wrappers';
    import { User, WebStorageStateStore } from 'oidc-client';
    import { createOidcAuth, SignInType, LogLevel, OidcAuth } from 'vue-oidc-client/vue3';
    
    console.log('xxxxxxx', import.meta.env)    &lt;&lt;&lt;&lt;- here is where it fails
    
    declare module '@vue/runtime-core' {
      interface ComponentCustomProperties {
        $oidc: OidcAuth;
      }
    }
    
    const appRootUrl = (new URL(import.meta.url)).origin.concat('/');
    const identityProvider = import.meta.env.VITE_MIRA_OIDC_AUTHORITY;
    const clientID = import.meta.env.VITE_MIRA_OIDC_CLIENT_ID;
    
    const idsrvAuth = createOidcAuth(
        'main',
        SignInType.Window,
        appRootUrl,
        {
          authority: identityProvider,
          client_id: clientID,
          response_type: 'code',
          scope: 'openid',
          userStore: new WebStorageStateStore({ store: localStorage }),
        },
        console,
        LogLevel.Debug
      );
</code></pre>
<p>Any ideas why import.meta is available in axios.ts boot file but isn't in auth.ts boot file?</p>
<p>Thx for any advice.</p>
<p>I tried to figure out if it has something to to with the configuration of the babel transpilation and different babel.config.js files for the imported modules but couldn't figure it out.</p>
",https://stackoverflow.com/questions/76365157/cypress-12-13-0-webpack-compilation-error-when-accessing-import-meta-using-ts-lo,"['webpack', 'babeljs', 'cypress']",35,False,0,0
Where should I install Cypress? What are the limitations of running Cypress tests in it&#39;s own repo as opposed to within the main application repo?,"<p>I'm putting together a proof on concept for my team to make the move from Selenium over to Cypress to do E2E testing. We have front end and back end both in different repos and are deployed and released independently. I am trying to figure out where to install Cypress and what the limitations may be depending on my choice.</p>
<p>Option 1: Install Cypress in the front end repo where I can run the tests against a local build and have the tests run as part of the build.</p>
<p>Option 2: Install Cypress in it's own repo and 'visit' the QA environments URL.</p>
<p>Option 2 would be the preferred method as it wouldn't require code changes from the QA analysts going into the source code repo.</p>
<p>If I go with option 2, what are some the benefits that I'd lose from installing Cypress within the source codes repo?</p>
<p>Thanks</p>
<p>I have watched some videos and followed some tutorials on how to implement Cypress E2E tests and I've noticed that they all show to install in the same repo as the source code, but the topic isn't heavily covered. The tutorials just assume that the tests are being written by a developer as opposed to a QA analyst that has limitations in committing code to the src repo.</p>
",https://stackoverflow.com/questions/75592670/where-should-i-install-cypress-what-are-the-limitations-of-running-cypress-test,"['cypress', 'cypress-testing-library']",35,False,2,0
cypress browser sends all cookies in all requests,"<p>I am using cypress for e2e testing with the <a href=""https://docs.cypress.io/api/commands/session"" rel=""nofollow noreferrer"">session storage feature</a> enabled.<br />
Until recently the only two cookies in the project were &quot;access_token&quot; and &quot;refresh_token&quot;. Now I added 2 more cookies which store some data which will automatically be written and read while you're using the website.</p>
<p>When browsing the website with any native browser (chrome, firefox, edge), no cookies get sent by the frontend to the backend in the request. Only the &quot;access_token&quot;s content will be used as the Authentication bearer.<br />
When browsing in any browser inside cypress or letting cypress automatically browse, all cookies which exist will be added to every sent request. Not only requests sent by <code>cy.request()</code> but also the requests which the frontend natively sends.</p>
<p>This is a problem since the header size gets to large and the backend wont accept it. The quickfix was to increase the accepted header size in the backend but I'd prefer not sending the cookies at all.</p>
<p>Is there a way to tell cypress which cookies to send or prevent sending cookies at all? I don't really care which cookies will be stored in the cypress session. Only which cookies get sent.</p>
<p><strong>EDIT:</strong></p>
<p>All cookies use &quot;strict&quot; same site settings.<br />
When testing against a deployed system https is used but with an invalid certificate.<br />
When testing against a locally running system http is used.</p>
<p>The cookies only get sent when running cypress against a local system (localhost).</p>
",https://stackoverflow.com/questions/75310250/cypress-browser-sends-all-cookies-in-all-requests,"['cookies', 'browser', 'cypress']",114,False,0,1
Cypress - tests sometimes fail to start in GitLab CI while always running locally,"<p>Background - I am creating a Next.js project with MUI and TypeScript. For e2e testing and component testing, I have chosen to use Cypress. I am also using GitLab where I have a simple CI pipeline.</p>
<p>I am getting an error with my Cypress tests while running them in the GitLab pipeline. This error does not occur all the time so if I rerun the pipeline a few times, I always get it to pass eventually. When I run <code>npm run test</code> locally, I get no errors.</p>
<p>I have a feeling it is connected to how the image initializes. When files such as core.70 get removed during the setup, the pipeline fails. When other files are removed, it sometimes passes. See the logs for that. I cannot be certain that there is a cousation though, might be a coincidence.</p>
<p>For this run, I have ran the pipeline 4 times in a row with no changes. The first three times I got the same error while the fourth time passed. The behaviouor always changes as sometimes it passes the first time etc.</p>
<p>I can clearly see the error where X or $DISPLAY is missing but since it doesn't happen consistently and I couldn't find anyone else having problems with it (given that they are using the cypress docker images), I would assume it is not a problem on my side (as sometimes I am not missing any dependencies)</p>
<p><a href=""https://i.stack.imgur.com/LkyLr.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/LkyLr.png"" alt=""screenshot of the pipeline showing that it suddenly passes after multiple runs"" /></a></p>
<p>First run log (very similar to second and third runs):</p>
<pre><code>[0KRunning with gitlab-runner 15.11.0 (436955cb)[0;m
[0K  on Builder 2 sa1k-77p, system ID: s_7635428d789e[0;m
section_start:1684766061:resolve_secrets
[0K[0K[36;1mResolving secrets[0;m[0;m
section_end:1684766061:resolve_secrets
[0Ksection_start:1684766061:prepare_executor
[0K[0K[36;1mPreparing the &quot;docker&quot; executor[0;m[0;m
[0KUsing Docker executor with image cypress/browsers:node18.12.0-chrome107 ...[0;m
[0KUsing locally found image version due to &quot;if-not-present&quot; pull policy[0;m
[0KUsing docker image sha256:f72e0260bf9d186c75431f774e824dd77b964d370151ac52ef9d7fd7f8bda259 for cypress/browsers:node18.12.0-chrome107 with digest cypress/browsers@sha256:bfdbf9b64fdaad364f6e76e3c2a75fbce7c8018644d71e41ef43bba0ae8f4e38 ...[0;m
section_end:1684766065:prepare_executor
[0Ksection_start:1684766065:prepare_script
[0K[0K[36;1mPreparing environment[0;m[0;m
Running on runner-sa1k-77p-project-10579-concurrent-0 via eipbuilder2...
section_end:1684766066:prepare_script
[0Ksection_start:1684766066:get_sources
[0K[0K[36;1mGetting source from Git repository[0;m[0;m
[32;1mFetching changes with git depth set to 20...[0;m
Reinitialized existing Git repository in **REDACTED**
[32;1mChecking out 84807f1a as detached HEAD (ref is e2e-new)...[0;m
Removing core.70
Removing core.71
Removing node_modules/

[32;1mSkipping Git submodules setup[0;m
section_end:1684766077:get_sources
[0Ksection_start:1684766077:step_script
[0K[0K[36;1mExecuting &quot;step_script&quot; stage of the job script[0;m[0;m
[0KUsing docker image sha256:f72e0260bf9d186c75431f774e824dd77b964d370151ac52ef9d7fd7f8bda259 for cypress/browsers:node18.12.0-chrome107 with digest cypress/browsers@sha256:bfdbf9b64fdaad364f6e76e3c2a75fbce7c8018644d71e41ef43bba0ae8f4e38 ...[0;m
[32;1m$ npm ci[0;m

added 555 packages, and audited 556 packages in 1m

172 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
[32;1m$ npm run test[0;m

&gt; training-platform-frontend@0.1.0 test
&gt; cypress run --component --browser chrome --headless

[STARTED] Task without title.
[FAILED] Cypress failed to start.
[FAILED] 
[FAILED] This may be due to a missing library or dependency. https://on.cypress.io/required-dependencies
[FAILED] 
[FAILED] Please refer to the error below for more details.
[FAILED] 
[FAILED] ----------
[FAILED] 
[FAILED] [71:0522/143550.440517:ERROR:ozone_platform_x11.cc(240)] Missing X server or $DISPLAY
[FAILED] [71:0522/143550.440614:ERROR:env.cc(255)] The platform failed to initialize.  Exiting.
[FAILED] 
[FAILED] ----------
[FAILED] 
[FAILED] Platform: linux-x64 (Debian - 11.5)
[FAILED] Cypress Version: 12.12.0
Cypress failed to start.

This may be due to a missing library or dependency. https://on.cypress.io/required-dependencies

Please refer to the error below for more details.

----------

[71:0522/143550.440517:ERROR:ozone_platform_x11.cc(240)] Missing X server or $DISPLAY
[71:0522/143550.440614:ERROR:env.cc(255)] The platform failed to initialize.  Exiting.

----------

Platform: linux-x64 (Debian - 11.5)
Cypress Version: 12.12.0
section_end:1684766153:step_script
[0Ksection_start:1684766153:cleanup_file_variables
[0K[0K[36;1mCleaning up project directory and file based variables[0;m[0;m
section_end:1684766154:cleanup_file_variables
[0K[31;1mERROR: Job failed: exit code 1
[0;m
</code></pre>
<p>Fourth run log:</p>
<pre><code>[0KRunning with gitlab-runner 15.11.0 (436955cb)[0;m
[0K  on Builder 1 baaac080, system ID: s_cb29ef96823f[0;m
section_start:1684766184:resolve_secrets
[0K[0K[36;1mResolving secrets[0;m[0;m
section_end:1684766184:resolve_secrets
[0Ksection_start:1684766184:prepare_executor
[0K[0K[36;1mPreparing the &quot;docker&quot; executor[0;m[0;m
[0KUsing Docker executor with image cypress/browsers:node18.12.0-chrome107 ...[0;m
[0KUsing locally found image version due to &quot;if-not-present&quot; pull policy[0;m
[0KUsing docker image sha256:f72e0260bf9d186c75431f774e824dd77b964d370151ac52ef9d7fd7f8bda259 for cypress/browsers:node18.12.0-chrome107 with digest cypress/browsers@sha256:bfdbf9b64fdaad364f6e76e3c2a75fbce7c8018644d71e41ef43bba0ae8f4e38 ...[0;m
section_end:1684766184:prepare_executor
[0Ksection_start:1684766184:prepare_script
[0K[0K[36;1mPreparing environment[0;m[0;m
Running on runner-baaac080-project-10579-concurrent-0 via eipbuilder1...
section_end:1684766185:prepare_script
[0Ksection_start:1684766185:get_sources
[0K[0K[36;1mGetting source from Git repository[0;m[0;m
[32;1mFetching changes with git depth set to 20...[0;m
Reinitialized existing Git repository in **REDACTED**
[32;1mChecking out 84807f1a as detached HEAD (ref is e2e-new)...[0;m
Removing .next/
Removing next-env.d.ts
Removing node_modules/

[32;1mSkipping Git submodules setup[0;m
section_end:1684766191:get_sources
[0Ksection_start:1684766191:step_script
[0K[0K[36;1mExecuting &quot;step_script&quot; stage of the job script[0;m[0;m
[0KUsing docker image sha256:f72e0260bf9d186c75431f774e824dd77b964d370151ac52ef9d7fd7f8bda259 for cypress/browsers:node18.12.0-chrome107 with digest cypress/browsers@sha256:bfdbf9b64fdaad364f6e76e3c2a75fbce7c8018644d71e41ef43bba0ae8f4e38 ...[0;m
[32;1m$ npm ci[0;m

added 555 packages, and audited 556 packages in 50s

172 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
[32;1m$ npm run test[0;m

&gt; training-platform-frontend@0.1.0 test
&gt; cypress run --component --browser chrome --headless

[STARTED] Task without title.
[SUCCESS] Task without title.
</code></pre>
<p>This is my pipeline configuration:</p>
<pre><code># Test Stage
test:
    image: cypress/browsers:node18.12.0-chrome107
    script:
        - npm ci
        - npm run test

</code></pre>
<p>With this in my package.json:</p>
<pre><code>&quot;scripts&quot;: {
    ...
    &quot;test&quot;: &quot;cypress run --component --browser chrome --headless&quot;,
  },
</code></pre>
<p>cypress.config.ts:</p>
<pre class=""lang-js prettyprint-override""><code>import { defineConfig } from 'cypress';

export default defineConfig({
    e2e: {
        setupNodeEvents(on, config) {
            // implement node event listeners here
        },
        excludeSpecPattern: ['**/examples/**/*'],
        baseUrl: 'http://localhost:3000',
        video: false,
    },

    component: {
        devServer: {
            framework: 'next',
            bundler: 'webpack',
        },
        video: false,
    },
});

</code></pre>
<p>I have looked over the Continuous Integration section on the Cypress website.</p>
<p>I have tried different images such as <code>cypress/base:latest</code> or <code>node:latest</code> but none of them worked better. I have also tried to add <code>undet DISPLAY</code> which was recommended somewhere but to no avail.</p>
<p>I have tried omitting the <code>--headless</code> or the browsers etc.</p>
",https://stackoverflow.com/questions/76307393/cypress-tests-sometimes-fail-to-start-in-gitlab-ci-while-always-running-locall,"['next.js', 'gitlab', 'cypress', 'gitlab-ci', 'gitlab-ci-runner']",102,False,0,0
