module TeamCity::Client::Tests

Defines methods related to tests

Public Instance Methods

tests(options={}) click to toggle source

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)

# File lib/teamcity/client/tests.rb, line 11
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