What is the reason for Nightwatch running each .js file as a Child process? Could it be due to alterations in the configuration settings

Recently, I've been experiencing an issue when running Nightwatch.js where my console is spawning child processes for every .js file in each folder and subfolder. Multiple Chrome instances are opening along with them and even the module folders with require JS libraries. I suspect I may have missed some configuration settings.

All I want is to run the main Nightwatch js file with just one instance of Chrome.

Upon checking my console, it displays "Starting.."

nightwatch bot.js -c config_chrome.json

Child process started for: tests/extra/assertions/customAssertion Child process started for: tests/extra/commands/customCommand

tests/extra/assertions/customAssertion has finished.

tests/extra/commands/customCommand has finished.

Child process started for: tests/extra/commands/customCommandConstructor Child process started for: tests/extra/commands/other/otherCommand

tests/extra/commands/customCommandConstructor has finished.

Child process started for: tests/extra/globals

tests/extra/globals has finished.

Child process started for: tests/extra/otherPageobjects/otherPage

tests/extra/otherPageobjects/otherPage has finished.

Child process started for: tests/extra/pageobjects/SimplePageFn

tests/extra/pageobjects/SimplePageFn has finished.

Child process started for: tests/extra/pageobjects/invalidPageObj

tests/extra/commands/other/otherCommand has finished.

Child process started for: tests/extra/pageobjects/simplePageObj

tests/extra/pageobjects/invalidPageObj has finished.

Answer №1

Ooops, I totally blanked on adding the --test parameter to the console command! :)

Answer №2

There is a particular configuration setting that may result in this type of behavior.

If you have enabled the "test_workers": true option in your nightwatch.conf.js file, all of your tests will be executed in parallel. This will spawn separate child processes for each file in the directory where the nightwatch testing framework runs its tests.

For more information, please refer to the documentation located here:
https://github.com/nightwatchjs/nightwatch-docs/blob/master/guide/running-tests/run-parallel.md

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

Utilizing Django to determine the appropriate view based on whether it is a GET request or an AJAX POST method

In my Django project, I have a view that serves different purposes depending on whether the request method is GET or POST. When it's a GET request, the view simply renders the page for the user. On the other hand, when it's a POST request, I use ...

nodemon breaks down frequently while anticipating changes in files

After cloning a project that I finished 2 months ago, I am facing an issue where nodemon won't run. Despite trying to close npm using task manager on Windows and running it again, the error persists. I am also utilizing MongoDB as my database. If any ...

Adjusting the size of a dynamically generated rectangle using DrawingManager

I am currently working on a web application using Azure Maps along with the DrawingManager library. My goal is to allow users to save a drawn rectangle and potentially edit it by resizing later on. The strange thing is that while resizing rectangles works ...

There is a lack of 'Access-Control-Allow-Origin' header, resulting in no access to the API

Having some trouble with the UK Parliament API, I keep encountering this error: XMLHttpRequest cannot load . No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://example.com' is therefore not a ...

Unable to import CSV file

I'm currently in the process of developing a CSV editor that involves importing a CSV file and converting it into HTML tables. Below is the code I have been working on: <html> <head> <title></title> </head> <body& ...

What could be causing this JavaScript if statement to consistently evaluate to true?

I'm facing an issue where I want to run a specific block of code when a div is clicked for the first time, and then another block when it's clicked for the second time. The problem is that even though my alert shows the variable being updated wit ...

Learn the technique of swapping out a portion of a string with a value from an input field in real-time

My webpage has a form on the left side where users can input text, and on the right is some static text. I want the text on the right to update automatically as the user types in the input field on the left. In my HTML code, it looks something like this - ...

Enhance Your jQuery Skills by Adding Custom Directories to Anchor Links

Can jQuery be used to add a custom folder name in front of all links on a webpage? For example, if the website has these links: <a href="/user/login">Login</a> <a href="/user/register">Register</a> <a href="/user/forum">Foru ...

Does ng-include fetch the included HTML files individually or merge them into a single HTML file before serving?

Is there a performance impact when using the ng-include Angular directive, in terms of having included HTML files downloaded as separate entities to the user's browsers? I am utilizing a CDN like AWS CloudFront instead of a node server to serve the H ...

How can I use jQuery UI to slide a div, while also smoothly moving the adjacent div to take its place?

Wishing you an amazing New Year! I am looking to create a smooth sliding effect for a div when a button is clicked. I want the adjacent div to slide alongside it seamlessly, without any clunky motions or delays. Currently, the adjacent div only moves afte ...

Troubleshooting the error "The 'listener' argument must be a function" in Node.js HTTP applications

I'm facing an issue resolving this error in my code. It works perfectly fine on my local environment, but once it reaches the 'http.get' call, it keeps throwing the error: "listener argument must be a function." Both Nodejs versions are iden ...

Choose the value of the dynamically changing id with the same name using jQuery

Whenever I choose the id (they all have the same id number which is fetched dynamically), it displays the value of the first id. Here's how I'm trying to implement it, but it doesn't seem to be working: function editdr() { qty = $(thi ...

Is there a way in Jquery to retrieve the id of the clicked element and modify its name?

I am using a drag-and-drop website builder that utilizes HTML blocks, each with a unique ID. After dropping the blocks onto the canvas, I want to create a navigation menu that links to the IDs of each block. How can I retrieve the current ID of the block I ...

Different ways to rearrange the placement of Export buttons in a personalized div or outside the table using Datatable

I would like to display the export buttons outside of the table. While searching on stackoverflow, I came across an example that uses the Select options method. You can find the example here. If anyone knows how to achieve this, please modify it and shar ...

The function 'ShouldWorkController' was expected but is not defined, receiving undefined instead

Whenever I attempt to connect a controller to a template using the angular-ui-router $stateProvider, I encounter this error message: 'ShouldWorkController' is not a function. Got undefined. Surprisingly, when I define the controller within the ...

When the Button is clicked, the component utilizing the Router fails to appear

My current task involves creating a page where users can choose between two options: Button 1 leads to TestOption.js, while Button 2 redirects to TestOption2 (currently using TestOption for testing purposes). The default landing page is SelectionPage. The ...

Creating an Angular table with dynamic column headers

While working on an angular app to showcase data from different sources, I set up a JSON file with a list of various data sources along with their respective values. Here's an example: var configurableConfigurations=[ { name:"Locations", ...

"Securing Your Web Application with Customized HTTP Headers

I'm currently working on setting up a POST request to a REST API (Cloudsight) with basic authorization. Here is the code I have so far: var xhr = new XMLHttpRequest(); xhr.open("POST", "http://api.cloudsightapi.com/image_requests", true); xhr.setRequ ...

Verify whether the variable is defined or present within the Angular controller

In my Angular controller, I have the following function: $scope.sendCompanyData = function() { delete $scope.company["step1Form"]; delete $scope.company["step2Form"]; delete $scope.standard_address["state"]; $http.post(Routing.generate(&a ...

What is the correct way to execute a JavaScript function during the page load event?

Currently, I am utilizing a currency conversion Web Service and I have implemented a Javascript function to display the result upon clicking a button. However, I would like this Javascript function to execute automatically when the page loads. Here is the ...