Created
May 4, 2011 00:36
-
-
Save jweden/954539 to your computer and use it in GitHub Desktop.
Reads in groovy-style properties file
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 weden.jason.qa.someProduct; | |
/** | |
* This is the groovy class which puts the test cases in the external testCases.properties | |
* file into a data structure for the java program to use. | |
*/ | |
public class TestcaseGrabber { | |
protected List<Map<String,String>> getTestcases() { | |
def testConfig = null; | |
try { | |
testConfig = new ConfigSlurper().parse(new File('src/main/resources/testCases.properties').toURL()) | |
} catch (Exception ex) { | |
println('Error reading in test case property file'); | |
} | |
return testConfig.testCases | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment