Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testcafe just stops/hangs with nativeAutomation true #7652

Closed
stefanlivens opened this issue Apr 21, 2023 · 5 comments · Fixed by #7698
Closed

testcafe just stops/hangs with nativeAutomation true #7652

stefanlivens opened this issue Apr 21, 2023 · 5 comments · Fixed by #7698
Assignees
Labels
SYSTEM: native automation TYPE: bug The described behavior is considered as wrong (bug).

Comments

@stefanlivens
Copy link

What is your Scenario?

i'm testing a Vue3 application. Without nativeAutomation everything runs fine (the tests i mean)
If i turn on NativeAutomation, the tests just stops, or hangs or just doesn't do anything.

There are no errors, no warnings in the output of testcafe, nor in the console of the browser. It just 'stops'. it seems like the expect doesn't signal to the test that it is finished.

As you can see in below example, i get the console.logs a and b, but never c. the browser just sits there. Also no timeout errors. just ...nothing...

I cannot create a sample repo as it is internal app. but i would like to have hints or tips on what i can turn on to get more info or debug info? I tried debugMode, and it stops at the first expect, upon resuming it has the same behaviour: it just stops

What is the Current behavior?

test run just hangs

What is the Expected behavior?

run to the finish

What is your public website URL? (or attach your complete example)

internal app.

What is your TestCafe test code?

import RequestTravellerInfo from '../pageModels/RequestTravellerInfo';

fixture('Request traveller info page')
.page(RequestTravellerInfo.pageURL)

test('The request-traveller-info page should show the correct title', async (testController) => {
console.log('do i get here?','a');//yes
await testController
.expect(RequestTravellerInfo.title.innerText)
.contains('Warp tickets');
console.log('do i get here?','b');//yes
await testController
.expect(RequestTravellerInfo.title.innerText)
.contains('Warp tickets');
});

test('The user should be able to fill in the inputfield firstname', async (testController) => {
console.log('do i get here?','c');//NO!!
await testController
.typeText(RequestTravellerInfo.firstNameInput, 'Spock')
.expect(RequestTravellerInfo.firstNameInput.value).eql('Spock');
});

Your complete configuration file

{
"browsers": [
"chrome"
],
"src": "./tests/functional/**/*.cspec.js",
"hostname": "localhost",
"reporter": [
{
"name": "spec"
},
{
"name": "html",
"output": "./tests/functional/reports/html/index.html"
},
{
"name": "xunit",
"output": "./tests/functional/reports/report.xml"
}
],
"screenshots": {
"takeOnFails": true,
"path": "./tests/screenshots",
"fullPage": true,
"pathPattern": "${FIXTURE}/${TEST}/test-${TEST_INDEX}/${USERAGENT}/${FILE_INDEX}.png"
},
"pageLoadTimeout": 10000,
"clientScripts": [
{
"module": "axe-core/axe.min.js"
}
],
"debugMode": true,
"nativeAutomation": true
}

Your complete test report

no report, because the tests doesn't conclude.

Screenshots

No response

Steps to Reproduce

TestCafe version

2.5.0

Node.js version

16.18.1

Command-line arguments

testcafe './tests/functional/fixtures/RequestTravellerInfo.cspec.js'

Browser name(s) and version(s)

chrome 112

Platform(s) and version(s)

macOS 13.3.1

Other

No response

@stefanlivens stefanlivens added the TYPE: bug The described behavior is considered as wrong (bug). label Apr 21, 2023
@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Apr 21, 2023
@AlexKamaev AlexKamaev added SYSTEM: native automation STATE: Need simple sample A simple sample is required to examine the issue. and removed STATE: Need response An issue that requires a response or attention from the team. labels Apr 25, 2023
@github-actions
Copy link

Thank you for submitting this issue. We would love to assist you and diagnose it. However, we need a simple sample that we can easily run on our side in order to replicate the issue and research its cause. Without a sample, we are not able to figure out what's going on and why this issue occurs. Refer to this article to create the best example: How To: Create a Minimal Working Example When You Submit an Issue. We look forward to your response.

@github-actions github-actions bot added the STATE: Need clarification An issue lacks information for further research. label Apr 25, 2023
@jurgensweere
Copy link

jurgensweere commented Apr 26, 2023

Here is a sample repository to replicate the issue:

https://github.com/jurgensweere/hello-world

It is a vuejs application generated with the vue-cli, added testcafe, enabled nativeAutomation and added 5 tests. When running in Node v18.16.0 (or v16.19.0) it will run 1 (or 2) tests successfully but never reaches any additional tests.

You can replicate by cloning the repository and then:
npm install
npm run serve-test

@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Apr 26, 2023
@AlexKamaev
Copy link
Contributor

Thank you for your cooperation. I managed to reproduce the issue. We'll research it.

@need-response-app need-response-app bot removed the STATE: Need response An issue that requires a response or attention from the team. label Apr 27, 2023
@AlexKamaev AlexKamaev removed STATE: Need clarification An issue lacks information for further research. STATE: Need simple sample A simple sample is required to examine the issue. labels Apr 27, 2023
@mikkel-ol
Copy link

+1

@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label May 2, 2023
@aleks-pro aleks-pro removed the STATE: Need response An issue that requires a response or attention from the team. label May 2, 2023
@Aleksey28 Aleksey28 self-assigned this May 3, 2023
miherlosev pushed a commit that referenced this issue May 16, 2023
<!--
Thank you for your contribution.

Before making a PR, please read our contributing guidelines at

https://github.com/DevExpress/testcafe/blob/master/CONTRIBUTING.md#code-contribution

We recommend creating a *draft* PR, so that you can mark it as 'ready
for review' when you are done.
-->
[closes #7652]

## Purpose
Fix hanging

## Approach
Force page reloading page between tests in NA if URL has a hash.

## References
#7652

## Pre-Merge TODO
- [x] Write tests for your proposed changes
- [ ] Make sure that existing tests do not fail
@github-actions
Copy link

Release v2.6.1-rc.1 addresses this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
SYSTEM: native automation TYPE: bug The described behavior is considered as wrong (bug).
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants