Last active
July 27, 2016 06:47
-
-
Save miyajan/fca9dbdd76860360fe6d4d6a081efb18 to your computer and use it in GitHub Desktop.
Jenkins JUnit Attachments Bug Reproduction Test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.miyajan; | |
import java.io.File; | |
import java.net.URL; | |
import org.apache.commons.io.FileUtils; | |
import org.junit.Test; | |
public class AttachmentsTest | |
{ | |
@Test | |
public void testScreenshot() throws Exception | |
{ | |
File outputDirectory = new File( "target/surefire-reports", | |
getClass().getName() ); | |
FileUtils.forceMkdir( outputDirectory ); | |
File screenFile = new File( outputDirectory, "test.png" ); | |
FileUtils.copyURLToFile( | |
new URL( "https://wiki.jenkins-ci.org/download/attachments/2916393/logo.png?version=1&modificationDate=1302753947000" ), | |
screenFile ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment