Will be invoked after once for every test case execution and a) video & tracing will be created in the given folder b) result will be published @author TestLeaf
()
| 138 | * @author TestLeaf |
| 139 | */ |
| 140 | @AfterMethod(alwaysRun = true) |
| 141 | public void tearDown() { |
| 142 | try { |
| 143 | |
| 144 | // End tracing |
| 145 | getContext().tracing().stop(new Tracing.StopOptions().setPath(Paths.get(tracesFolderName+"/"+testcaseName+".zip"))); |
| 146 | Video video = getPage().video(); |
| 147 | getPage().close(); |
| 148 | video.saveAs(Paths.get(videoFolderName+"/"+testcaseName+".webm")); |
| 149 | getContext().close(); // video will be saved |
| 150 | video.delete(); |
| 151 | getPlaywright().close(); |
| 152 | endResult(); |
| 153 | } catch (Exception e) { |
| 154 | e.printStackTrace(); |
| 155 | } |
| 156 | } |
| 157 | |
| 158 | @DataProvider |
| 159 | public Object[][] getData() throws IOException { |
nothing calls this directly
no test coverage detected