video-recorder-java
video-recorder-java copied to clipboard
Only temporary video files are created
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?
Probably your VM is slow so that it cannot write all the bytes. Try to add more CPU it can help
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.
Hello, could you please provide an example of such situation?
2018-04-19 9:17 GMT+03:00 tricone [email protected]:
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. It's there any way to avoid this, so that FFMpegRecorder should be closed always.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/SergeyPirogov/video-recorder-java/issues/51#issuecomment-382622939, or mute the thread https://github.com/notifications/unsubscribe-auth/AEaKCOdqu5cxxnbN2lvMxNIEXSRhQvwnks5tqCvegaJpZM4TYVoI .
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
Provide please example in code like
class Demo {
@test @video public void test(){ //body here } }
2018-04-19 10:50 GMT+03:00 tricone [email protected]:
I have a class with @video https://github.com/video and @test https://github.com/test which is loading some properties files from a directory. This @test https://github.com/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 https://github.com/video and @test https://github.com/test Class), recording remains in temporary file.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/SergeyPirogov/video-recorder-java/issues/51#issuecomment-382643671, or mute the thread https://github.com/notifications/unsubscribe-auth/AEaKCAWcqmvYVY2dRVyCg7xzory2F_N7ks5tqEHNgaJpZM4TYVoI .
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
Any idea? It happens also on local machine, not every time. I can not find the cause. Sometimes is working and sometimes is not.
Try to switch from FFMPEG to MONTE. It's more reliable