Class: Sapphire::Testing::TeamCity::TeamCityReporter
- Inherits:
-
Reporter
show all
- Includes:
- Rake::TeamCity::RunnerCommon, Rake::TeamCity::RunnerUtils, Rake::TeamCity::StdCaptureHelper, Rake::TeamCity::Utils::UrlFormatter
- Defined in:
- lib/sapphire/TeamCity.rb,
lib/sapphire/TeamCity/TeamCityReporter.rb
Constant Summary
collapse
- TEAMCITY_FORMATTER_INTERNAL_ERRORS =
[]
- @@reporter_closed =
false
- @@RUNNING_EXAMPLES_STORAGE =
{}
Instance Attribute Summary
Attributes inherited from Reporter
#broken_count, #failing_count, #passing_count, #pending_count, #test_count, #time
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
Teamcity #############################
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
# File 'lib/sapphire/TeamCity/TeamCityReporter.rb', line 46
def initialize()
set_message_factory(::Rake::TeamCity::MessageFactory)
@groups_stack = []
if ::Rake::TeamCity.is_in_idea_mode
elsif ::Rake::TeamCity.is_in_buildserver_mode
log(@message_factory.create_progress_message("Starting..."))
end
@current = 0
end
|
Class Method Details
40
41
42
|
# File 'lib/sapphire/TeamCity/TeamCityReporter.rb', line 40
def self.close()
@@reporter_closed = true
end
|
.closed? ⇒ Boolean
36
37
38
|
# File 'lib/sapphire/TeamCity/TeamCityReporter.rb', line 36
def self.closed?()
@@reporter_closed
end
|
Instance Method Details
#BeginTesting ⇒ Object
129
130
131
|
# File 'lib/sapphire/TeamCity/TeamCityReporter.rb', line 129
def BeginTesting
log(@message_factory.create_test_reported_attached)
end
|
#InsertLineBreak ⇒ Object
82
83
84
|
# File 'lib/sapphire/TeamCity/TeamCityReporter.rb', line 82
def InsertLineBreak()
end
|
Teamcity #############################
29
30
31
32
33
34
|
# File 'lib/sapphire/TeamCity/TeamCityReporter.rb', line 29
def log(msg)
send_msg(msg)
msg
end
|
#OutputResults ⇒ Object
133
134
135
|
# File 'lib/sapphire/TeamCity/TeamCityReporter.rb', line 133
def OutputResults()
end
|
#PostPrint ⇒ Object
90
91
92
|
# File 'lib/sapphire/TeamCity/TeamCityReporter.rb', line 90
def PostPrint
end
|
86
87
88
|
# File 'lib/sapphire/TeamCity/TeamCityReporter.rb', line 86
def PrePrint
end
|
78
79
80
|
# File 'lib/sapphire/TeamCity/TeamCityReporter.rb', line 78
def PrintFooter()
end
|
74
75
76
|
# File 'lib/sapphire/TeamCity/TeamCityReporter.rb', line 74
def PrintHeader()
end
|
#PrintItem(result, depth) ⇒ Object
62
63
64
|
# File 'lib/sapphire/TeamCity/TeamCityReporter.rb', line 62
def PrintItem(result, depth)
end
|
#ScenarioComplete(scenario) ⇒ Object
70
71
72
|
# File 'lib/sapphire/TeamCity/TeamCityReporter.rb', line 70
def ScenarioComplete(scenario)
log(@message_factory.create_suite_finished("Scenario: " + scenario.text))
end
|
#ScenarioStart(scenario) ⇒ Object
66
67
68
|
# File 'lib/sapphire/TeamCity/TeamCityReporter.rb', line 66
def ScenarioStart(scenario)
log(@message_factory.create_suite_started("Scenario: " + scenario.text))
end
|
#TestBroken(test) ⇒ Object
121
122
123
|
# File 'lib/sapphire/TeamCity/TeamCityReporter.rb', line 121
def TestBroken(test)
log(@message_factory.create_test_ignored(test.text, "Broken"))
end
|
#TestFailed(test) ⇒ Object
102
103
104
105
106
107
108
109
110
111
112
113
114
115
|
# File 'lib/sapphire/TeamCity/TeamCityReporter.rb', line 102
def TestFailed(test)
if test.messages.is_a? Array
messages = test.messages.join("\n")
else
messages = test.messages
end
stack = ""
test.stack.each do |line|
if (!line.include? "sapphire")
stack += line + "\n"
end
end
log(@message_factory.create_test_failed(test.text, messages, stack))
end
|
#TestingComplete ⇒ Object
125
126
127
|
# File 'lib/sapphire/TeamCity/TeamCityReporter.rb', line 125
def TestingComplete()
end
|
#TestPassed(test) ⇒ Object
98
99
100
|
# File 'lib/sapphire/TeamCity/TeamCityReporter.rb', line 98
def TestPassed(test)
log(@message_factory.create_test_finished(test.text, test.time))
end
|
#TestPending(test) ⇒ Object
117
118
119
|
# File 'lib/sapphire/TeamCity/TeamCityReporter.rb', line 117
def TestPending(test)
log(@message_factory.create_test_ignored(test.text, "Pending: Not Yet Implemented"))
end
|
#TestStarted(test) ⇒ Object
94
95
96
|
# File 'lib/sapphire/TeamCity/TeamCityReporter.rb', line 94
def TestStarted(test)
log(@message_factory.create_test_started(test.text))
end
|