How to do Parallel test execution using ruby scrit ans rspec #7678

Closed
mthangaraj opened this Issue Jan 11, 2017 · 2 comments

Projects

None yet

4 participants

@mthangaraj
mthangaraj commented Jan 11, 2017 edited

I have sample simple web automation script in Ruby with Rspec. Now i want to execute in parallel like as TestNG. But no support for TestNG in ruby. So how to achieve parallel execution.

What am need is i have only one test method(it xxxxx do), i need to launch two browsers simultaneously and execute single test script into both browsers.

Automation script:-

require "selenium-webdriver"
require 'rspec'

describe "Google Search" do

before(:each) do
@driver = Selenium::WebDriver.for :firefox
@base_url = "https://www.mkyong.com/java/how-to-create-directory-in-java/"
@accept_next_alert = true
@driver.manage.timeouts.implicit_wait = 30
@driver.manage.window.maximize
end

after(:each) do
@driver.quit
end

it "search text on google" do
@driver.get(@base_url + "/")
@driver.find_element(:link, "Android").click
@driver.find_element(:link, "Java Core").click
@driver.find_element(:link, "JDBC").click
@driver.find_element(:xpath, ".//*[@id='menu-item-11032']/a").click
@driver.find_element(:name, "sender_name").send_keys "test"
@driver.find_element(:name, "email_from").send_keys "test@mail.com"
@driver.find_element(:name, "email_subject").send_keys "test_subject"
@driver.find_element(:name, "email_message").send_keys "test message"
end

end

@triager triager added the NeedsTriage label Jan 11, 2017
@steffencrespo

This does not look like an issue related to appium. You would have the same results if you were running your tests with selenium webdriver alone.
Look after something like selenium grid or a way to run rspec tests in parallel, such as knapsack.

@vikramvi
Contributor

@mthangaraj please post this in discuss.appium forum. This place is to file bugs related to appium server and not to ask queries.

@triager please close as not relevant

@triager triager closed this Jan 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment