Class: TestRail::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/testrail/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(username, password, url) ⇒ Client

Returns a new instance of Client.



5
6
7
8
9
10
# File 'lib/testrail/client.rb', line 5

def initialize(username,password,url)
  @url_endpoint = url || self.class.url
  @connection = APIClient.new(url)
  @connection.user = username || self.class.username
  @connection.password = password || self.class.password
end

Instance Attribute Details

#connectionObject

Returns the value of attribute connection.



3
4
5
# File 'lib/testrail/client.rb', line 3

def connection
  @connection
end

#passwordObject

Returns the value of attribute password.



3
4
5
# File 'lib/testrail/client.rb', line 3

def password
  @password
end

#urlObject

Returns the value of attribute url.



3
4
5
# File 'lib/testrail/client.rb', line 3

def url
  @url
end

#usernameObject

Returns the value of attribute username.



3
4
5
# File 'lib/testrail/client.rb', line 3

def username
  @username
end

Instance Method Details

#projectObject



12
13
14
# File 'lib/testrail/client.rb', line 12

def project
  Project.new(connection)
end

#releaseObject



16
17
18
# File 'lib/testrail/client.rb', line 16

def release
  Release.new(connection)
end

#sectionObject



20
21
22
# File 'lib/testrail/client.rb', line 20

def section
  Section.new(connection)
end

#suiteObject



24
25
26
# File 'lib/testrail/client.rb', line 24

def suite
  Suite.new(connection)
end

#test_caseObject



28
29
30
# File 'lib/testrail/client.rb', line 28

def test_case
  TestCase.new(connection)
end

#test_resultObject



32
33
34
# File 'lib/testrail/client.rb', line 32

def test_result
  TestResult.new(connection)
end

#test_runObject



36
37
38
# File 'lib/testrail/client.rb', line 36

def test_run
  TestRun.new(connection)
end