What is the best way to execute multiple testsuites simultaneously with TestCafe, and how can you run a single testsuite

I am facing a situation where I have 6 different test suites that need to be executed. Among them, 5 of the test suites should run with 3 concurrent browsers while the remaining 1 needs to run without any concurrency. Additionally, I want all the results from these 6 test suites to be combined in a single HTML file.

Although I have explored the test runner solution, I am struggling to understand how I can execute the one test suite without concurrency.

Below is an excerpt from the TestRunner code:


let testcafe = null;

createTestCafe('localhost', 1337, 1338)
  .then((tc) => {
    testcafe = tc;
    const runner = testcafe.createRunner();

    return runner
      .src('uitests/tests/test1.js', 'uitests/tests/test2.js', 'uitests/tests/test3.js', 'uitests/tests/tes4t.js', 'uitests/tests/test5.js')
      .browsers('chrome:headless')
      .screenshots('screenshots', true)
      .reporter('html', 'resultsrunner.html')
      .concurrency(3)
      .run({
        skipJsErrors: true,
      })
  })
  .then(() => {
    testcafe.close();
  });

Now, my concern is how can I modify my code so that test6.js runs without any concurrency and the results of all 6 test suites are collated into a single HTML file?


      .src('uitests/tests/test6.js')
      .browsers('chrome:headless')
      .screenshots('screenshots', true)
      .reporter('html', 'resultsrunner.html')
      .run({
        skipJsErrors: true,
      })

Answer №1

Testcafe does not have the capability to run tests with and without concurrency together in a single execution. An improved method, instead of what TallKU suggested, is to create a custom testcafe reporter and utilize the same reporter for both testcafe runs.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Why is inner HTML returning input/textbox instead of the value?

I need help extracting the value from an input/textbox within a table cell. Although the rest of my code is functioning correctly, I'm struggling to retrieve the value from this particular input element. I've attempted to access the value using ...

The TypeScript factory class anticipates an intersection

In my code, I have a class factory called pickSomething that generates a specific type based on a key provided from a ClassMap: class A { keya = "a" as const; } class B { keyb = "b" as const; } type ClassMap = { a: A b: B } c ...

Maximizing the Potential of AngularJS with HTML Injections via Chrome Extensions

Is there anyone out there who has experience using AngularJS for Chrome extensions? If I wanted to insert a div into a page and have control over the layout and structure, what would be the best approach? I'm concerned about interfering with the par ...

Clickable boxes for selecting options (Ajax and JavaScript)

I have a new project that involves creating a checkbox and using ajax and javascript to change its state when clicked. The goal is for the checkbox state to be saved in a php program that generates a .txt file. The state should be 0 when not clicked and 1 ...

Vue.js - Testing components with intricate child components

Imagine we have a simple Bootstrap powered HTML form within a custom Vue component named MyForm.vue <template> <form> <div class="form-group"> <label for="email">Email address</label> <input type="email" ...

Counting the number of times a form is submitted using a submit button and storing the data

After researching for a few hours, I've gathered information on different techniques for storing data related to a submit button counter in a text file. <form action="/enquiry.php" method="post" name="form"> <label>Name *</label> &l ...

"Combining Angular and jQuery for powerful web development

I am looking to develop an application using Angular and incorporate numerous jQuery animations and jQuery UI effects (such as animate, fadeIn, fadeOut, etc). Is it feasible to use jQuery functions in conjunction with Angular? ...

Ensure the detection of 404 error status using jQuery

My current approach involves using this code snippet to retrieve data from Twitter through its API: $.ajax({ url : apiUrl, cache : false, crossDomain: true, dataType: "jsonp", success : f ...

I am experiencing an error message that reads "Select.js:1555 Uncaught TypeError: Cannot read property 'isSelectOptGroup' of undefined." What could be causing this issue?

Recently diving into the world of React, I have been attempting to display dynamic values in a dropdown menu by fetching data from a dummy API. Unfortunately, I encountered an error related to select.js which resulted in my web page displaying as blank. ...

Rendering Objects with Three.JS in an AngularJS Directive

I am currently in the process of integrating Three.JS into an AngularJS directive. Right now, my main goal is to create a proof-of-concept implementation that can serve as a template for a more complex directive in the future. Currently, I am utilizing th ...

Tips for using a JavaScript function to navigate to a specific division (<div>) on an HTML page

I am facing an issue where I need to redirect within the same HTML page that includes a add-form div. What I want is that when I click on a button, my redirection should be to a specific div containing some code. Currently, I have code that redirects to a ...

Difficulties encountered while executing jest alongside bootstrap-vue

I've been encountering errors while trying to set up unit tests with jest and bootstrap-vue. The errors specifically mention unknown custom elements like: [Vue warn]: Unknown custom element: b-navbar - did you register the component correctly?... [ ...

Issue with Ag-Grid's getRowClass not locating the appropriate CSS styling

I am facing a simple challenge at the moment. My goal is to dynamically change the background color of my rows, with the intention of incorporating this feature when expanding or contracting groups. Currently, I am attempting to utilize gridOptions.getRow ...

Insert a design layout into a text entry box

Currently developing an application with AngularJS and seeking a solution for adding a "template" to an HTML input field similar to a placeholder. Specifically, I have a date-field requiring user input in the format of dd/MM/yyyy or through a datepicker se ...

The amazing magnific popup boasts a pair of close buttons

I recently started working on integrating a front-end HTML theme with a back-end Laravel app. Oddly enough, I noticed that the popup modal is displaying two close x buttons instead of just one. Despite my efforts, I have been unable to pinpoint what exactl ...

Executing a javascript function from an ajax-loaded webpage

I have a form where I upload a file using an ajax call that includes an API request. Once the API call is successful, I need to update a table displaying the list of uploaded files. Initially, I attempted calling a JavaScript function within the ajax page, ...

Making a chain of multiple AJAX requests using jQuery

My current challenge involves retrieving data from select options on a website using JavaScript. Specifically, I am trying to obtain a list of zones within my country from a website that has this information. The issue I am facing is the hierarchical disp ...

Redis: Unable to establish a connection as net.connect is not recognized as a

I'm struggling to integrate Redis with nodejs Encountering issues during execution Despite using the same code, I am facing this error: Here's my code snippet: import { createClient } from 'redis' export const client = createClient({ ...

Guidelines for naming classes in scss when working with Next.js

Is it possible to use CSS naming conventions in SCSS files with Next.js and then import them into JavaScript using a different convention? // login.module.scss file: .login-button { // some scss styling } // Login.js file: import styles from './ ...

Translate the DateTime to the local time zone

As a newcomer to AngularJS, I am working on capturing a DateTime attribute in the UI and passing it to an Odata endpoint. However, the time being sent is not in the current local time. How can I convert this time to local time before sending it to the Odat ...