Created
February 6, 2021 02:34
-
-
Save wf-adamhei/662d212d6bf0f52a0c62915e98db8a4d to your computer and use it in GitHub Desktop.
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
def getAllUITestClassNames() { | |
def allSwiftFiles = sh( | |
script: “find WealthfrontUITests -name ‘*.swift’”, | |
returnStdout: true | |
).trim().split(‘\n’) as String[] | |
def directory = pwd() | |
def allClassNames = [] | |
allSwiftFiles.each { | |
def file = readFile “${directory}/${it}” | |
def matcher = (file =~ /(?<=class ).*?(?=:)/) | |
if (matcher.count > 0) { | |
allClassNames += matcher[0] | |
} | |
} | |
def testClassNames = allClassNames.findResults { | |
it.endsWith(“UITest”) || it.endsWith(“IntegrationTest”) ? it : null | |
} | |
return testClassNames | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment