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

path pattern placeholder ${TEST} - cannot be applied to the recorded video. #7256

Closed
fmancardi opened this issue Aug 26, 2022 · 7 comments
Closed
Assignees
Labels
TYPE: enhancement The accepted proposal for future implementation.

Comments

@fmancardi
Copy link

What is your Scenario?

I want to create videos (or screenshot) where the filename will contain the testcase name.
I create one js file for each test case.

I'm providing this config

"pathPattern": "${DATE}_${TIME}/${TEST}/${RUN_ID}/${USERAGENT}/${FILE_INDEX}.mp4"

What is the Current behavior?

This is the message I got

The "${TEST}" path pattern placeholder cannot be applied to the recorded video.
The placeholder was replaced with an empty string.

file is pathname:
C:\development\test-automation\end-to-end\artifacts\videos\2022-08-26_09-34-57\Chrome_104.0.5112.102_Windows_10\1.mp4

What is the Expected behavior?

C:\development\test-automation\end-to-end\artifacts\videos\2022-08-26_09-34-57\PPT-8309-Forn-PopupExport-campi\Chrome_104.0.5112.102_Windows_10\1.mp4

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

does not matter

What is your TestCafe test code?

does not matter

Your complete configuration file

{
"selectorTimeout":2000,
"skipJsErrors":true,
"screenshots":{
"takeOnFails":true
},
"videoOptions":{
"singleFile":true,
"failedOnly":false,
"pathPattern": "${DATE}_${TIME}/${TEST}/${RUN_ID}/${USERAGENT}/${FILE_INDEX}.mp4"
}
}

Your complete test report

No response

Screenshots

No response

Steps to Reproduce

use the provide config file, then run the test with option to record video

TestCafe version

1.20.0

Node.js version

v18.4.0

Command-line arguments

testcafe 'chrome --start-fullscreen' --video artifacts/videos --test-meta WKFSTATUS=ready,7.0=yes --cfg=at-7.0.json ./test/product-tree/PT.99.Framework/PT.99.03.Master-data/PT.99.03.Fornitori/System.Feature.Acceptance/PPT-8309-Forn-PopupExport-campi.js

Browser name(s) and version(s)

No response

Platform(s) and version(s)

windows 11

Other

No response

@fmancardi fmancardi added the TYPE: bug The described behavior is considered as wrong (bug). label Aug 26, 2022
@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Aug 26, 2022
@Aleksey28
Copy link
Collaborator

Hi @fmancardi,

This happens because you use the singleFile option. In this case, all your tests are recorded in one file. Thus, we cannot determine what exact name that we should put in the pattern. That is why, you do not see the desired behavior, and you get a warning:
image

@need-response-app need-response-app bot removed the STATE: Need response An issue that requires a response or attention from the team. label Aug 29, 2022
@fmancardi
Copy link
Author

OK, thanks a lot, I'm sorry for the misundertanding

@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Aug 29, 2022
@fmancardi
Copy link
Author

Confirmed, it worked with this .testcaferc.json -> "singleFile":false,

{
  "selectorTimeout":2000,
  "skipJsErrors":true,
  "screenshots":{
    "takeOnFails":true
  },
  "videoOptions":{
    "singleFile":false,
    "failedOnly":false,
    "pathPattern": "${DATE}_${TIME}/${TEST}/${RUN_ID}/${USERAGENT}/${FILE_INDEX}.mp4"
  }
}

I suggest to use a different (clearer IMHO) warning message like:

{$TEST} can not be used if you configure "singleFile":true,

@Aleksey28
Copy link
Collaborator

Thank you for the suggestion. We will add warnings if singleFile is true and will update this thread once this happens.

@Aleksey28 Aleksey28 reopened this Aug 30, 2022
@need-response-app need-response-app bot removed the STATE: Need response An issue that requires a response or attention from the team. label Aug 30, 2022
@Aleksey28 Aleksey28 added TYPE: enhancement The accepted proposal for future implementation. and removed TYPE: bug The described behavior is considered as wrong (bug). labels Aug 30, 2022
@fmancardi
Copy link
Author

Thanks a lot!

@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Aug 30, 2022
@Aleksey28 Aleksey28 removed the STATE: Need response An issue that requires a response or attention from the team. label Aug 31, 2022
@Artem-Babich Artem-Babich self-assigned this Jun 14, 2023
@github-actions
Copy link

Release v3.0.1-rc.1 addresses this.

@github-actions
Copy link

Release v3.0.1 addresses this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TYPE: enhancement The accepted proposal for future implementation.
Projects
None yet
Development

No branches or pull requests

3 participants