Class: QTest::TestCase

Inherits:
Base
  • Object
show all
Defined in:
lib/qtest/test_case.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#all, #create, #initialize, method_missing, #move, #unique

Constructor Details

This class inherits a constructor from QTest::Base

Instance Attribute Details

#descriptionObject

Returns the value of attribute description.



10
11
12
# File 'lib/qtest/test_case.rb', line 10

def description
  @description
end

#idObject

Returns the value of attribute id.



10
11
12
# File 'lib/qtest/test_case.rb', line 10

def id
  @id
end

#moduleObject

Returns the value of attribute module.



10
11
12
# File 'lib/qtest/test_case.rb', line 10

def module
  @module
end

#nameObject

Returns the value of attribute name.



10
11
12
# File 'lib/qtest/test_case.rb', line 10

def name
  @name
end

#orderObject

Returns the value of attribute order.



10
11
12
# File 'lib/qtest/test_case.rb', line 10

def order
  @order
end

#pidObject Also known as: tag

Returns the value of attribute pid.



10
11
12
# File 'lib/qtest/test_case.rb', line 10

def pid
  @pid
end

#preconditionObject

Returns the value of attribute precondition.



10
11
12
# File 'lib/qtest/test_case.rb', line 10

def precondition
  @precondition
end

#projectObject

Returns the value of attribute project.



10
11
12
# File 'lib/qtest/test_case.rb', line 10

def project
  @project
end

#test_case_version_idObject Also known as: version

Returns the value of attribute test_case_version_id.



10
11
12
# File 'lib/qtest/test_case.rb', line 10

def test_case_version_id
  @test_case_version_id
end

#test_runObject

Returns the value of attribute test_run.



10
11
12
# File 'lib/qtest/test_case.rb', line 10

def test_run
  @test_run
end

#web_urlObject Also known as: url

Returns the value of attribute web_url.



10
11
12
# File 'lib/qtest/test_case.rb', line 10

def web_url
  @web_url
end

Class Method Details

.find_by(opts = {}) ⇒ Object



4
5
6
7
# File 'lib/qtest/test_case.rb', line 4

def find_by(opts = {})
  opts[:page] ||= 1
  super
end

Instance Method Details

#step(opts = {}) ⇒ QTest::TestStep

Get a specific Test Step under the Test Case.

Parameters:

  • opts (Hash) (defaults to: {})
  • id (Hash)

    a customizable set of options

Returns:



22
23
24
25
26
27
# File 'lib/qtest/test_case.rb', line 22

def step(opts = {})
  unique(QTest::TestStep,
         project: @project.id,
         test_case: @id,
         id: opts[:id])
end

#stepsArray[QTest::TestStep]

Get all Test Steps under the Test Case.

Returns:



32
33
34
# File 'lib/qtest/test_case.rb', line 32

def steps
  all(QTest::TestStep, project: @project.id, test_case: @id)
end