autopsy 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/autopsy.rb +16 -18
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a6496477c5ec86e2d3aad4a56d02645e32eb4c5
|
4
|
+
data.tar.gz: 63da106d9b296983ca38892b988e75f2c93030e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 15ea0486b451ce12fa96fd0a85a71df4ebd1e0ac4c093050cb6e847275309676bad60dbebbbc5664d0b7042c3c854ea77f61a3591d509439053b308d72003a04
|
7
|
+
data.tar.gz: 100a12552176a31d3491f5cf7ea025006ad9c3f96f758a2d8348f96b9218d5cbf2d3814fa2d56309bc7049ed25922adc421fa883eefb323863deda375768d44a
|
data/lib/autopsy.rb
CHANGED
@@ -5,28 +5,26 @@ require 'awesome_print'
|
|
5
5
|
class Autopsy
|
6
6
|
class << self
|
7
7
|
attr_accessor :artifacts_path
|
8
|
-
end
|
9
|
-
end
|
10
|
-
|
11
|
-
Autopsy.artifacts_path = "./spec/artifacts" # default
|
12
8
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
File.open("#{file_base}_error.log", 'w') do |f|
|
23
|
-
f.write example.exception.message
|
24
|
-
f.write "\n"
|
25
|
-
example.exception.backtrace.each do |l|
|
26
|
-
f.write l
|
9
|
+
def perform(capybara_page, test_base, exception)
|
10
|
+
file_base = "#{File.expand_path(Autopsy.artifacts_path)}/#{test_base}"
|
11
|
+
if exception != nil
|
12
|
+
capybara_page.save_screenshot "#{file_base}.png"
|
13
|
+
capybara_page.save_page "#{file_base}.html"
|
14
|
+
msgs = capybara_page.driver.console_messages.ai(html: true)
|
15
|
+
File.open("#{file_base}_msgs.html", 'w') {|f| f.write(msgs) }
|
16
|
+
File.open("#{file_base}_error.log", 'w') do |f|
|
17
|
+
f.write exception.message
|
27
18
|
f.write "\n"
|
19
|
+
exception.backtrace.each do |l|
|
20
|
+
f.write l
|
21
|
+
f.write "\n"
|
22
|
+
end
|
28
23
|
end
|
29
24
|
end
|
30
25
|
end
|
31
26
|
end
|
32
27
|
end
|
28
|
+
|
29
|
+
Autopsy.artifacts_path = "." # default
|
30
|
+
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: autopsy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Will Pleasant-Ryan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-19 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: See error messages, screenshots, current HTML, and current Javascript
|
14
14
|
console messages on feature test failures.
|