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

Can't custom video name by [package name + class name + method name + nano timestamp] in TestNG video recording #65

Open
ansonliao opened this issue Jun 28, 2019 · 1 comment

Comments

@ansonliao
Copy link

ansonliao commented Jun 28, 2019

I am using the latest version of the video recording TestNG branch for my Selenium in the TestNG framework.

and the dependency is:

<dependency>
      <groupId>com.automation-remarks</groupId>
      <artifactId>video-recorder-testng</artifactId>
      <version>2.0</version>
</dependency>

I would like to name the video name as [package name + class name + method name + browser name + nano timestamp], and no idea about this.

I refer to the issue which closed: #30
and found the in TestNG video recording package, without the class VideoRule.java
so I can't custom the VideoRule by the solution provided by #30

Also I found the class UniversalVideoListener.java is implemented TestNG listener, included the test failure listener and there some code handle the video name, so I tried extended this class and override the method onTestFailure, but finally found the field private IVideoRecordClient videoRecordClient of TestNGListener is private and the interface IVideoRecordClient are also private.

@SergeyPirogov could you kindly provide some advise how I can do ?

Thanks.

@CrazyMoonkin
Copy link

CrazyMoonkin commented Jul 5, 2019

Try to use in test:

ITestResult result = Reporter.getCurrentTestResult();
System.setProperty("video.name", 
                    result.getTestClass().getName() + result.getMethod().getMethodName());

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