Here you can find the source of getResourceAsFile(T testSuite, String resourceName)
public static <T> File getResourceAsFile(T testSuite, String resourceName)
//package com.java2s; //License from project: Open Source License import java.io.File; import java.io.InputStream; public class Main { public static <T> File getResourceAsFile(T testSuite, String resourceName) { return new File(testSuite.getClass().getResource(resourceName).getPath()); }//w w w .j a v a2 s . c om public static <T> InputStream getResource(T testSuite, String resourceName) { return testSuite.getClass().getResourceAsStream(resourceName); } }