auto_test 0.0.9.3.2 → 0.0.9.3.3

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.
@@ -1,3 +1,3 @@
1
1
  module AutoTest
2
- VERSION = "0.0.9.3.2"
2
+ VERSION = "0.0.9.3.3"
3
3
  end
data/lib/simulation.rb CHANGED
@@ -28,7 +28,7 @@ end
28
28
 
29
29
  def init_user_inputs
30
30
  @user_inputs = Hash.new
31
- file = File.new("lib/auto_test/log/user_input.log", "r")
31
+ file = File.new("#{GEMPATH}/../../log/user_input.log", "r")
32
32
  while line = file.gets do
33
33
  b = line.split(/:/,2)
34
34
  @user_inputs["#{b[0].strip}"] = b[1].chop
@@ -83,7 +83,7 @@ def add_path(value)
83
83
  end
84
84
 
85
85
  def search_sessions
86
- path_to_search = File.new("lib/auto_test/log/new_path.log")
86
+ path_to_search = File.new("#{GEMPATH}/../../log/new_path.log")
87
87
  sessions = Array.new
88
88
  while line = path_to_search.gets do
89
89
  line.gsub!(/[{}\"]/,'')
@@ -105,7 +105,7 @@ init_path
105
105
  init_sessions_array
106
106
  init_user_inputs
107
107
  puts "Firefox is getting started..."
108
- paths = File.new("lib/auto_test/log/new_path.log")
108
+ paths = File.new("#{GEMPATH}/../../log/new_path.log")
109
109
  home = "localhost:3002"
110
110
  sessions = search_sessions
111
111
  number_of_sessions = sessions.size
data/lib/test.rb CHANGED
@@ -4,6 +4,8 @@ module AutoTest
4
4
  module Test
5
5
  module_function
6
6
 
7
+ GEMPATH = %x(gem which auto_test)
8
+
7
9
  # initialize all variables
8
10
  def initialize_test
9
11
  Error.init_error
@@ -293,8 +295,10 @@ module AutoTest
293
295
  end
294
296
 
295
297
 
298
+
299
+
296
300
  def write_user_input_to_file
297
- f = File.new("log/user_input.log", "w")
301
+ f = File.new("#{GEMPATH}/../../log/user_input.log", "w")
298
302
  if Test.no_auth then
299
303
  f.puts("get_number_of_test_runs:#{get_number_of_test_runs}
300
304
  get_number_of_sessions:#{get_number_of_sessions}")
@@ -361,13 +365,13 @@ module AutoTest
361
365
  end
362
366
  Test.check_invariants
363
367
  if !Test.stop? then Test.users_logged_in = Test.users_logged_in + 1 end
364
- f = File.new("log/paths.log", "w")
368
+ f = File.new("#{GEMPATH}/../../log/paths.log", "w")
365
369
  f.puts(Test.action_path)
366
370
  f.close
367
371
  puts
368
372
  Error.print_errors
369
373
  if Error.get_error > 0 then
370
- f = File.new("log/errors.log", "w")
374
+ f = File.new("#{GEMPATH}/../../log/errors.log", "w")
371
375
  f.puts(Error.get_error)
372
376
  f.puts(Error.get_error_messages)
373
377
  f.close
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: auto_test
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.9.3.2
5
+ version: 0.0.9.3.3
6
6
  platform: ruby
7
7
  authors:
8
8
  - Maike Hargens