Class: TestRail::Client
- Inherits:
-
Object
- Object
- TestRail::Client
- Defined in:
- lib/testrail/client.rb
Instance Attribute Summary collapse
-
#connection ⇒ Object
Returns the value of attribute connection.
-
#password ⇒ Object
Returns the value of attribute password.
-
#url ⇒ Object
Returns the value of attribute url.
-
#username ⇒ Object
Returns the value of attribute username.
Instance Method Summary collapse
-
#initialize(username, password, url) ⇒ Client
constructor
A new instance of Client.
- #project ⇒ Object
- #release ⇒ Object
- #section ⇒ Object
- #suite ⇒ Object
- #test_case ⇒ Object
- #test_result ⇒ Object
- #test_run ⇒ Object
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
#connection ⇒ Object
Returns the value of attribute connection.
3 4 5 |
# File 'lib/testrail/client.rb', line 3 def connection @connection end |
#password ⇒ Object
Returns the value of attribute password.
3 4 5 |
# File 'lib/testrail/client.rb', line 3 def password @password end |
#url ⇒ Object
Returns the value of attribute url.
3 4 5 |
# File 'lib/testrail/client.rb', line 3 def url @url end |
#username ⇒ Object
Returns the value of attribute username.
3 4 5 |
# File 'lib/testrail/client.rb', line 3 def username @username end |
Instance Method Details
#project ⇒ Object
12 13 14 |
# File 'lib/testrail/client.rb', line 12 def project Project.new(connection) end |
#release ⇒ Object
16 17 18 |
# File 'lib/testrail/client.rb', line 16 def release Release.new(connection) end |
#section ⇒ Object
20 21 22 |
# File 'lib/testrail/client.rb', line 20 def section Section.new(connection) end |
#suite ⇒ Object
24 25 26 |
# File 'lib/testrail/client.rb', line 24 def suite Suite.new(connection) end |
#test_case ⇒ Object
28 29 30 |
# File 'lib/testrail/client.rb', line 28 def test_case TestCase.new(connection) end |
#test_result ⇒ Object
32 33 34 |
# File 'lib/testrail/client.rb', line 32 def test_result TestResult.new(connection) end |