Commit
Add .tests() to retrieve test occurrences from a build.
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
module TeamCity | ||
class Client | ||
# Defines methods related to tests | ||
module Tests | ||
# HTTP GET | ||
|
||
# List of tests | ||
# | ||
# @param options [Hash] list of test locators to filter test results on | ||
# @return [Array<Hashie::Mash>] of tests (empty array if no tests exist) | ||
def tests(options={}) | ||
url_params = options.empty? ? '' : "?locator=#{locator(options)}" | ||
tests = [] | ||
begin | ||
response = get("testOccurrences#{url_params}") | ||
tests = response.testOccurrence | ||
rescue | ||
tests = [] | ||
end | ||
tests | ||
end | ||
end | ||
end | ||
end |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.