Class: TestRailOperations::TestCase

Inherits:
Object
  • Object
show all
Defined in:
lib/files/TestCase.rb

Overview

Represents a test case in test rail.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id, title, priority, automated, screen_size, automatable, references, run_once) ⇒ TestCase

Returns a new instance of TestCase.



12
13
14
15
16
17
18
19
20
21
22
# File 'lib/files/TestCase.rb', line 12

def initialize(id, title, priority, automated, screen_size, automatable, references, run_once)
  @id          = id
  @title       = title
  @priority    = priority
  @automated   = automated
  @screen_size = screen_size
  @automatable = automatable
  @references  = references
  @run_once  = run_once
  @skip = []
end

Instance Attribute Details

#assigned_toObject

Returns the value of attribute assigned_to.



10
11
12
# File 'lib/files/TestCase.rb', line 10

def assigned_to
  @assigned_to
end

#automatableObject

Returns the value of attribute automatable.



6
7
8
# File 'lib/files/TestCase.rb', line 6

def automatable
  @automatable
end

#automatedObject

Returns the value of attribute automated.



5
6
7
# File 'lib/files/TestCase.rb', line 5

def automated
  @automated
end

#fileObject

Which rspec file the test case is found in



7
8
9
# File 'lib/files/TestCase.rb', line 7

def file
  @file
end

#idObject

Returns the value of attribute id.



5
6
7
# File 'lib/files/TestCase.rb', line 5

def id
  @id
end

#metadataObject

Returns the value of attribute metadata.



8
9
10
# File 'lib/files/TestCase.rb', line 8

def 
  @metadata
end

#priorityObject

Returns the value of attribute priority.



5
6
7
# File 'lib/files/TestCase.rb', line 5

def priority
  @priority
end

#referencesObject

Returns the value of attribute references.



6
7
8
# File 'lib/files/TestCase.rb', line 6

def references
  @references
end

#result_messageObject

Returns the value of attribute result_message.



5
6
7
# File 'lib/files/TestCase.rb', line 5

def result_message
  @result_message
end

#run_onceObject

Returns the value of attribute run_once.



6
7
8
# File 'lib/files/TestCase.rb', line 6

def run_once
  @run_once
end

#screen_sizeObject

Returns the value of attribute screen_size.



5
6
7
# File 'lib/files/TestCase.rb', line 5

def screen_size
  @screen_size
end

#skipObject

Returns the value of attribute skip.



8
9
10
# File 'lib/files/TestCase.rb', line 8

def skip
  @skip
end

#statusObject

Returns the value of attribute status.



5
6
7
# File 'lib/files/TestCase.rb', line 5

def status
  @status
end

#temp_idObject

Returns the value of attribute temp_id.



9
10
11
# File 'lib/files/TestCase.rb', line 9

def temp_id
  @temp_id
end

#titleObject

Returns the value of attribute title.



5
6
7
# File 'lib/files/TestCase.rb', line 5

def title
  @title
end

Instance Method Details



29
30
31
32
33
34
35
36
# File 'lib/files/TestCase.rb', line 29

def print
  puts ""
  puts "Test Case: #{@id}, #{@title}"
  puts "\tPriority:    #{@priority}"
  puts "\tScreen Size: #{@screen_size}"
  puts "\tAutomated:   #{@automated}"
  puts "\tSkips:       #{skip}"
end

#set_status(status, message) ⇒ Object



24
25
26
27
# File 'lib/files/TestCase.rb', line 24

def set_status(status, message)
  @status = status
  @result_message = message # a string
end