Skip to content

Commit 6fc0a30

Browse files
authored
add parallel tests (#73)
* add parallel tests * add env * add -n 4 * remove unworth test * add wait for export session
1 parent 48e6519 commit 6fc0a30

File tree

4 files changed

+5
-9
lines changed

4 files changed

+5
-9
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ before_install:
1313

1414
script:
1515
- bundle exec rake rubocop
16-
- bundle exec rake test:unit
16+
- bundle exec parallel_test test/unit/ -n 4
1717

1818
notifications:
1919
email:

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Run unit tests which check each method and commands, URL, using the webmock.
1919

2020
```bash
2121
$ bundle install
22-
$ rake test:unit
22+
$ bundle exec parallel_test test/unit/
2323
```
2424

2525
### Functional Tests

appium_lib_core.gemspec

+1
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,5 @@ Gem::Specification.new do |spec|
3535
spec.add_development_dependency 'appium_thor', '~> 0.0', '>= 0.0.7'
3636
spec.add_development_dependency 'pry'
3737
spec.add_development_dependency 'pry-byebug'
38+
spec.add_development_dependency 'parallel_tests'
3839
end

test/unit/driver_test.rb

+2-7
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,8 @@ def file_exist?(file_path)
5050
def test_verify_session_id_in_the_export_session_path
5151
file = @core.export_session_path
5252
file_exist? file
53-
assert_equal '1234567890', File.read(file).strip
54-
end
55-
56-
def test_verify_session_from_default_value
57-
file = '/tmp/appium_lib_session'
58-
file_exist? file
59-
assert_equal '1234567890', File.read(file).strip
53+
@core.wait { assert_equal '1234567890', File.read(file).strip }
54+
File.delete file
6055
end
6156

6257
def test_verify_appium_core_base_capabilities_create_capabilities

0 commit comments

Comments
 (0)