charter 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/bin/charter +83 -0
- data/lib/charter/charter_template.md +22 -0
- data/lib/charter/doc.rb +79 -0
- data/lib/charter/version.rb +3 -0
- data/lib/charter.rb +9 -0
- metadata +124 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: c4e96719e4864c6ac6f1e4d678cb678428efea7e
|
4
|
+
data.tar.gz: 2ad3b415180f28d880c02e0bdc3c7c22b019a6e8
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: cb27ba1ce07226c0ff4125b1db19df0e78ce1ab553dcf3f99fbb246d05e7b5aa4c333f751c528adca786c60441ffd5eb7015760f4a0873e230b2552c5373205e
|
7
|
+
data.tar.gz: 7530defe081121d8bb0850299253ecfa46f6877ca95dcb69ce35200cb04e289a9a4d24f945f71f1e40c8864f050d766a5e11dcaa2a4580f991bdd15059d2020e
|
data/bin/charter
ADDED
@@ -0,0 +1,83 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'gli'
|
3
|
+
require 'charter'
|
4
|
+
|
5
|
+
include GLI::App
|
6
|
+
|
7
|
+
doc = Doc.new
|
8
|
+
|
9
|
+
program_desc 'A command line tool for session based testing'
|
10
|
+
|
11
|
+
version Charter::VERSION
|
12
|
+
|
13
|
+
desc 'Starts a new session charter'
|
14
|
+
arg_name 'SessionName'
|
15
|
+
command :start do |c|
|
16
|
+
c.action do |global_options,options,args|
|
17
|
+
doc.create(args)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
desc 'What are you testing'
|
22
|
+
arg_name 'What is the purpose of this session'
|
23
|
+
command :purpose, :p do |c|
|
24
|
+
c.action do |global_options,options,args|
|
25
|
+
doc.purpose(args[0])
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
desc 'Describe environment here'
|
30
|
+
arg_name 'List your environment'
|
31
|
+
command :env do |c|
|
32
|
+
c.action do |global_options,options,args|
|
33
|
+
doc.env(args[0])
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
desc 'Add a bug found during testing'
|
38
|
+
arg_name 'Add a bug to the current session'
|
39
|
+
command :bug do |c|
|
40
|
+
c.action do |global_options,options,args|
|
41
|
+
doc.bug(args[0])
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
desc 'Describe a scenario here'
|
46
|
+
arg_name 'Add a scenario to the current session'
|
47
|
+
command :scenario, :s do |c|
|
48
|
+
c.action do |global_options,options,args|
|
49
|
+
doc.scenario(args[0])
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
desc 'Final formatting to charter'
|
54
|
+
arg_name 'Type of export'
|
55
|
+
command :finish do |c|
|
56
|
+
c.action do |global_options,options,args|
|
57
|
+
c.flag :e
|
58
|
+
doc.finish
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
pre do |global,command,options,args|
|
63
|
+
# Pre logic here
|
64
|
+
# Return true to proceed; false to abort and not call the
|
65
|
+
# chosen command
|
66
|
+
# Use skips_pre before a command to skip this block
|
67
|
+
# on that command only
|
68
|
+
true
|
69
|
+
end
|
70
|
+
|
71
|
+
post do |global,command,options,args|
|
72
|
+
# Post logic here
|
73
|
+
# Use skips_post before a command to skip this
|
74
|
+
# block on that command only
|
75
|
+
end
|
76
|
+
|
77
|
+
on_error do |exception|
|
78
|
+
# Error logic here
|
79
|
+
# return false to skip default error handling
|
80
|
+
true
|
81
|
+
end
|
82
|
+
|
83
|
+
exit run(ARGV)
|
@@ -0,0 +1,22 @@
|
|
1
|
+
#Exploratory Testing Charter
|
2
|
+
<purpose>
|
3
|
+
|
4
|
+
##Environment
|
5
|
+
<environment>
|
6
|
+
|
7
|
+
##Length
|
8
|
+
Start Time: <start_time>
|
9
|
+
End Time: <end_time>
|
10
|
+
|
11
|
+
##Tester
|
12
|
+
<tester>
|
13
|
+
|
14
|
+
##Scenarios:
|
15
|
+
<scenarios>
|
16
|
+
|
17
|
+
##Defects Found:
|
18
|
+
<defects>
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
|
data/lib/charter/doc.rb
ADDED
@@ -0,0 +1,79 @@
|
|
1
|
+
#!/usr/bin/ruby
|
2
|
+
|
3
|
+
class Doc
|
4
|
+
|
5
|
+
def initialize(input=nil)
|
6
|
+
@config = read_config
|
7
|
+
end
|
8
|
+
|
9
|
+
def create(name)
|
10
|
+
template = File.read('lib/charter/charter_template.md')
|
11
|
+
charter = File.new("#{@config['session_folder']}/#{name[0]}.md", "w+")
|
12
|
+
charter.write(template)
|
13
|
+
charter.close
|
14
|
+
|
15
|
+
@config['current_session'] = "#{@config['session_folder']}/#{name[0]}.md"
|
16
|
+
|
17
|
+
replace_text('<start_time>', Time.now.strftime("%m/%d/%Y %H:%M") + " \r\n")
|
18
|
+
replace_text('<tester>', @config['tester'])
|
19
|
+
|
20
|
+
write_config
|
21
|
+
end
|
22
|
+
|
23
|
+
def bug(text)
|
24
|
+
replace_text('<defects>', "1. #{text} \r\n<defects>")
|
25
|
+
end
|
26
|
+
|
27
|
+
def scenario(text)
|
28
|
+
replace_text('<scenarios>', "1. #{text} \r\n<scenarios>")
|
29
|
+
end
|
30
|
+
|
31
|
+
def env(text)
|
32
|
+
replace_text("<environment>", text)
|
33
|
+
end
|
34
|
+
|
35
|
+
def purpose(text)
|
36
|
+
replace_text("<purpose>", text)
|
37
|
+
end
|
38
|
+
|
39
|
+
def finish
|
40
|
+
replace_text('<end_time>', Time.now.strftime("%m/%d/%Y %H:%M"))
|
41
|
+
|
42
|
+
aString = File.read(@config['current_session'])
|
43
|
+
#remove remaining placeholders
|
44
|
+
aString.gsub!(/\<(.*?)\>/, "")
|
45
|
+
file = File.open(@config['current_session'], "w")
|
46
|
+
file.puts aString
|
47
|
+
file.close
|
48
|
+
end
|
49
|
+
|
50
|
+
def export(name)
|
51
|
+
renderer = Redcarpet::Render::HTML.new(render_options = {})
|
52
|
+
markdown = Redcarpet::Markdown.new(renderer, extensions = {})
|
53
|
+
text = File.read(@config['current_session'])
|
54
|
+
html_file = File.new("#{@config['session_folder']}/#{name}.html", "w+")
|
55
|
+
html_text = markdown.render(text)
|
56
|
+
html_file.write(html_text)
|
57
|
+
end
|
58
|
+
|
59
|
+
def replace_text(find,replace)
|
60
|
+
aString = File.read(@config['current_session'])
|
61
|
+
aString.gsub!(find, replace)
|
62
|
+
file = File.open(@config['current_session'], "w")
|
63
|
+
file.puts aString
|
64
|
+
file.close
|
65
|
+
end
|
66
|
+
|
67
|
+
private
|
68
|
+
def read_config
|
69
|
+
if File.exists? File.expand_path(SESSION_CONFIG)
|
70
|
+
return YAML.load_file(File.expand_path(SESSION_CONFIG))
|
71
|
+
else
|
72
|
+
return {}
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
def write_config
|
77
|
+
File.open(File.expand_path(SESSION_CONFIG), 'w') { |yf| YAML::dump(@config, yf) }
|
78
|
+
end
|
79
|
+
end
|
data/lib/charter.rb
ADDED
metadata
ADDED
@@ -0,0 +1,124 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: charter
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.2
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Mark Grossman
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-04-01 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rake
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rdoc
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: aruba
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: gli
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 2.9.0
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 2.9.0
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: redcarpet
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 3.1.1
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 3.1.1
|
83
|
+
description:
|
84
|
+
email: mark@testwith.me
|
85
|
+
executables:
|
86
|
+
- charter
|
87
|
+
extensions: []
|
88
|
+
extra_rdoc_files: []
|
89
|
+
files:
|
90
|
+
- bin/charter
|
91
|
+
- lib/charter.rb
|
92
|
+
- lib/charter/charter_template.md
|
93
|
+
- lib/charter/doc.rb
|
94
|
+
- lib/charter/version.rb
|
95
|
+
homepage: http://testwith.me
|
96
|
+
licenses: []
|
97
|
+
metadata: {}
|
98
|
+
post_install_message:
|
99
|
+
rdoc_options:
|
100
|
+
- "--title"
|
101
|
+
- charter
|
102
|
+
- "--main"
|
103
|
+
- README.rdoc
|
104
|
+
- "-ri"
|
105
|
+
require_paths:
|
106
|
+
- lib
|
107
|
+
- lib
|
108
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
109
|
+
requirements:
|
110
|
+
- - ">="
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
version: '0'
|
113
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
requirements: []
|
119
|
+
rubyforge_project:
|
120
|
+
rubygems_version: 2.2.2
|
121
|
+
signing_key:
|
122
|
+
specification_version: 4
|
123
|
+
summary: A CLI for creating a session based testing charter
|
124
|
+
test_files: []
|