Skip to content

Commit 75e6528

Browse files
committed
Fix tests
1 parent 2683b9b commit 75e6528

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

appium/check_run_failues.rb

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,11 @@ def ios_check
5757
if a.name == 'Syslog'
5858
content = open(a.url).read
5959
if p.problems[0].test.name == 'test_throw_error'
60-
puts content
6160
raise RuntimeError, "Sentry should start twice: #{p.inspect}" unless content.scan(/Sentry Started -- Version/).size == 2
62-
raise RuntimeError, "No JSON SENT: #{p.inspect}" unless content.scan(/Sentry - Verbose:: Sending JSON/).size == 1
63-
raise RuntimeError, "Wrong exception value: #{p.inspect}" unless content.scan(/"value" : "Sentry: Test throw error"/).size == 1
64-
raise RuntimeError, "No javascript frames: #{p.inspect}" unless content.scan(/"platform" : "javascript"/).size >= 1
61+
raise RuntimeError, "No JSON SENT: #{p.inspect}" unless content.scan(/Sentry - Debug:: Request status: 200/).size == 1
6562
elsif p.problems[0].test.name == 'test_native_crash'
6663
raise RuntimeError, "Sentry should start twice: #{p.inspect}" unless content.scan(/Sentry Started -- Version/).size == 2
67-
raise RuntimeError, "No JSON SENT: #{p.inspect}" unless content.scan(/Sentry - Verbose:: Sending JSON/).size == 1
64+
raise RuntimeError, "No JSON SENT: #{p.inspect}" unless content.scan(/Sentry - Debug:: Request status: 200/).size == 1
6865
raise RuntimeError, "exception_name should be EXC_BREAKPOINT: #{p.inspect}" unless content.scan(/"exception_name" : "EXC_BREAKPOINT"/).size == 1
6966
end
7067
end

appium/tests/test_ios.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ def test_throw_error(driver):
7575
js_frames += 1
7676
assert js_frames > 0
7777
assert len(event['exception']['values']) > 0
78+
assert event['exception']['values'][0]['value'] == "Sentry: Test throw error"
79+
assert event['exception']['values'][0]['type'] == "Error"
7880
assert event['platform'] == 'cocoa'
7981
assert event['level'] == 'fatal'
8082
assert event['extra']['react']
@@ -106,6 +108,8 @@ def test_native_crash(driver):
106108
assert cocoa_frames > 0
107109
assert len(event['exception']['values']) > 0
108110
assert len(event['debug_meta']['images']) > 0
111+
assert event['exception']['values'][0]['value'] == 'crash'
112+
assert event['exception']['values'][0]['type'] == 'EXC_BAD_INSTRUCTION'
109113
assert event['platform'] == 'cocoa'
110114
assert event['level'] == 'fatal'
111115
assert event['extra']['react']

0 commit comments

Comments
 (0)