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

Only temporary video files are created #51

Open
tricone opened this issue Apr 17, 2018 · 8 comments
Open

Only temporary video files are created #51

tricone opened this issue Apr 17, 2018 · 8 comments

Comments

@tricone
Copy link

tricone commented Apr 17, 2018

I created with TestFx (testing JavaFX applications) a junit. I successfully created a recorded test with @video annotation before the @test. Everything is ok on the local machine. But when I am trying to run this junit from a Jenkins Job, on a virtual machine, (a Jenkins Slave Machine) I get the error message: "com.automation.remarks.video.exception.RecordingException: Condition with lambda expression in awinta.intellitax.MyCustomFFMpegRecorder that uses java.io.File was not fulfilled within 5 seconds. " There are created only some temporal files, but they can not be played.
temporary_recording_2018_17_04_15_19_56.mp4

I changed the interval from 5 seconds to 180 seconds...but still the error appears. Any idea?

@SergeyPirogov
Copy link
Owner

Probably your VM is slow so that it cannot write all the bytes. Try to add more CPU it can help

@tricone
Copy link
Author

tricone commented Apr 19, 2018

Actually I tested, and if the junit is crashing( Null pointer for example, or some elements are not found) the process FFMpegRecorder remains opened in TaskManager, and the temporary file is created. It's there any way to avoid this, so that FFMpegRecorder should be closed always, and temporary file should be converted to a complete recording? Thanks, Sergey.

@SergeyPirogov
Copy link
Owner

SergeyPirogov commented Apr 19, 2018 via email

@tricone
Copy link
Author

tricone commented Apr 19, 2018

I have a class with @video and @test which is loading some properties files from a directory. This @test Class is calling another class where test scenarios are executed(click, etc) for each properties file. If there is an error(null pointer exception) in the scenario class(the one which is called by the @video and @test Class), recording remains in temporary file.

After the null pointer appears:

2018-04-19 11:30:29,977 [user/ID]:[] INFO ffmpeg.FFMpegRecorder - Trying to execute the following command: [cmd, /c, for /f "tokens=2" %i in ('tasklist ^| findstr "ffmpeg"') do @echo %i]
2018-04-19 11:30:30,588 [user/ID]:[] INFO ffmpeg.FFMpegRecorder - Trying to execute the following command: [SendSignalCtrlC.exe, 11852
9200
13668
18684
4652]
2018-04-19 11:30:30,623 [user/ID]:[] INFO ffmpeg.FFMpegRecorder - Process kill output: Sending ctrl-c signal to process 11852...

And temporary files are created an a lot of ffmpeg.FFMpegRecorder remains in the TaskManager

@SergeyPirogov
Copy link
Owner

SergeyPirogov commented Apr 19, 2018 via email

@tricone
Copy link
Author

tricone commented Apr 20, 2018

There is a directory with some properties.files
I load every properties file and do some action on the GUI
Junit is started by the Gradle. Any idea?

@test
@video
public void testSuite() {
try {
Properties configFile;
File myConfig = new File("d:/rezept");
File[] listFiles = myConfig.listFiles();
for (File fileToRead : listFiles) {
configFile = new java.util.Properties();
try {
FileInputStream fileInput = new FileInputStream(fileToRead);
configFile.load(fileInput);
IntellitaxUiTest tesst = new IntellitaxUiTest(configFile);
tesst.shouldClickOnHealthInsurranceField(); //where shouldClickOnHealthInsurranceField is doing different action on the GUI based on the properties file

@tricone
Copy link
Author

tricone commented Apr 23, 2018

Any idea? It happens also on local machine, not every time. I can not find the cause. Sometimes is working and sometimes is not.

@SergeyPirogov
Copy link
Owner

Try to switch from FFMPEG to MONTE. It's more reliable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants