Rectangle 27 7

I presume you are trying to use transactional fixtures (the default behavior) with Selenium, but that won't work. The transaction that is managed within the test is out of scope when the browser invokes the Rails app separately, so it can't see any of the uncommitted data that your test has created.

Instead of transactional fixtures, you'll need to use one of the database cleaner gems.

I subsequently became aware that it is possible to use transactional fixtures with Selenium tests, and performance is better if you do (credit to Kira Corina's answer). See http://pastie.org/1745020 for details.

DatabaseCleaner.strategy = :truncation

Thanks @Steve for the pastie.org/1745020 link, that works perfectly fro me!

ruby on rails - Why does my Cucumber test fail when run with Selenium?...

ruby-on-rails testing selenium cucumber capybara
Rectangle 27 3

In Selenium RC you have the file "grid_configuration.yml" where you have the list of browsers and their respective identifier, for instance "*firefox". Depending of your environment when you execute "firefox" you'll be probably calling a wrapper, an alias or a symbolic link of the firefox executable file. When Selenium is launched, it creates some fork process for the browser and depending if you are calling the firefox executable file directly or a wrapper, the creation of these process is different and when it tries to kill the process in the tearDown() it actually kills the child process and keep the father alive, so the tearDown() doesn't close the browser.

The solution is edit the "grid_configuration.yml" file changing "*firefox" for the absolute path of the browser executable file (always with * at the beginning)

unit testing - Firefox windows don't close after Selenium test has run...

unit-testing firefox selenium selenium-rc
Rectangle 27 2

As Eugene said - Download Selenium IDE. Play along with it, recording and running test cases.

Go through the official docs.

Export test cases in the language of your choice.

Read a few blogs regarding WebDriver. Try a few code snippets.

Write your own logic for data driven or key driven test cases.

Found this link coreygoldberg.blogspot.in/2011/07/ - all about how to start Selenium Webdriver with Python. Looks good enough for beginners

Sign up for our newsletter and get our top new questions delivered to your inbox (see an example).

testing - How to start with Selenium Webdriver? - Stack Overflow

testing selenium automation webdriver
Rectangle 27 1

I would not rely on manual testing alone. I would automate the testing of each feature branch with Jenkins. I setup a VMWare lab to run Jenkins tests on Linux and Windows for all browsers. It's truly an awesome cross browser, cross platform testing solution. I test functional/integration with Selenium Webdriver. My selenium tests run under Rspec. And I wrote them specially to be loaded by jRuby on Windows. I run traditional unit tests under Rspec and Javascript tests under Jasmine. I setup headless testing with Phantom JS.

Git branching strategy integated with testing/QA process - Stack Overf...

git testing qa git-flow
Rectangle 27 1

I would not rely on manual testing alone. I would automate the testing of each feature branch with Jenkins. I setup a VMWare lab to run Jenkins tests on Linux and Windows for all browsers. It's truly an awesome cross browser, cross platform testing solution. I test functional/integration with Selenium Webdriver. My selenium tests run under Rspec. And I wrote them specially to be loaded by jRuby on Windows. I run traditional unit tests under Rspec and Javascript tests under Jasmine. I setup headless testing with Phantom JS.

Git branching strategy integated with testing/QA process - Stack Overf...

git testing qa git-flow
Rectangle 27 1

I would not rely on manual testing alone. I would automate the testing of each feature branch with Jenkins. I setup a VMWare lab to run Jenkins tests on Linux and Windows for all browsers. It's truly an awesome cross browser, cross platform testing solution. I test functional/integration with Selenium Webdriver. My selenium tests run under Rspec. And I wrote them specially to be loaded by jRuby on Windows. I run traditional unit tests under Rspec and Javascript tests under Jasmine. I setup headless testing with Phantom JS.

Git branching strategy integated with testing/QA process - Stack Overf...

git testing qa git-flow
Rectangle 27 1

When you create a drop down using HTML ul and li tags, then to access the drop down list, First you have click on Drop down box then try finding "Facial" element.

selenium webdriver
Rectangle 27 0

I've created separate tests in Selenium IDE and then batched them in a test suite

After that ... when I ran them, the ${variable_name} stored in test 1 works fine in test 2.

testing - Selenium Test Runner and variables problem - Stack Overflow

testing selenium automated-tests integration-testing
Rectangle 27 0

You can set the format when working in Selenium IDE by going to Options-> Format and then set it to the language of your choice. It means that you can create c# tests without having to convert them as you go. You can still rightclick and choose your command and it will update to c# in the IDE.

c# - How to run a recorded (HTML) selenium test from .NET - Stack Over...

c# testing selenium
Rectangle 27 0

First of all: save a test suite in Selenium IDE (File > Save Test Suite). You should generate test suite - it will contain information about test cases (which, of course, should also be saved (File > Save Test Case)). Then you are ready for testing with Selenium RC. Try it with below command:java -jar path/to/selenium-server-standalone.jar -htmlsuite "*firefox" "http://google.com" "path/to/your/testsuite1" "path/to/result.html"result.html - this file will be generated during/after execution. Be sure that name of browser, URL and paths to test suite and result file are in the quotation marks.

Thank you faramka, its working :).But can i run scripts in PHP/ java format on command prompt?also 1 more thing, it is not supporting conditional statements.Currently it is giving error as Unknown command: gotoIf

selenium RC and Flow control - Stack Overflow

selenium selenium-rc
Rectangle 27 0

If I understand correctly you are asking about the 'recording' feature that the plugin provides. Have a look at the code that it creates (on demand). You can also write that code in a text editor or ide of your choice and then run these tests as part of a test suite in the language that you choose (e.g. java).

This solution requires running the browser(s) you want to test on some test machine/server.

testing - Is it possible to run and create Selenium IDE test cases wit...

firefox testing selenium
Rectangle 27 0

I suggest IBM Rational Functional Tester. It's java based, making it very extensible. It's not Javascript, so be warned that test are written in java code. For most of it there's a recorder: you simply click around and it records your actions.

It is a commercial product. I'm not affiliated with IBM but I work with RFT a lot.

asp.net - How to create functional / UI-Tests for an existing web appl...

asp.net testing selenium automated-tests jasmine
Rectangle 27 0

The best pattern I have seen for organizing the code behind selenium tests is the page object pattern:

Here's a Java helper library:

How to create structured automatic testing with selenium (junit or tes...

junit selenium automated-tests testng
Rectangle 27 0

I would recommend looking at the JUnit or TestNG XML reports. You should be able to transform them with a bit of XSLT to provide a new HTML report with your required format.

How to create structured automatic testing with selenium (junit or tes...

junit selenium automated-tests testng
Rectangle 27 0

You can group your tests with it in an very easy structered way.

Thanks for the idea. My question is more like one comment for this blog post on your site: Posted by Madhavi | Tuesday 22 January 9:01 AM "(...) Do you know any way to inbed one test suite into another. I need to create smaller test suites for each functionality and include those test suites into the master test suite."

from my point of knowledge it is not possible but also not needed. You have to design your code around those test classes not the other way. Sorry, I think your approach is maybe to complex. But an solution would be to design special test suites and place them into packages. So you can test software components via packages. Hope this helps...

Thanks :) The idea behind is to have not only small tests for each functionality but being able to run all of those small grouped on level1, then a few of those grouped on level2 and so on. If the group on level2 (as all in them) fails - then having possibility to dig down to group on level1 and then to the one small test that failed. Isn't it usual practice for writing functional tests?

You have a neat idea there...isn't the same procedure that a lot of people use to learn foreign languages? Talking about Unit testing..i don't know if anybody developed something for this issues. I'm sorry...i can't answer your question.

It looks like digging into testng can help with it. See my last link.

How to create structured automatic testing with selenium (junit or tes...

junit selenium automated-tests testng
Rectangle 27 0

You would invoke the tests like you would for your normal unit tests. Assuming that you are creating your tests to be run with NUnit then you will need to make sure that that is installed.

Setting up your Selenium project, like a normal class library project, that builds a dll that can run your tests should suffice.

How can I run that dll from hudson?

How are you running the dll now in your local machine?

c# - Integration of automated testing in hudson using selenium framewo...

c# selenium
Rectangle 27 0

Selenium is a very good open source automated testing tool for websites. It can drive different web browers on different platforms, and tests can be written in a number of different languages. It also has a component called Selenium IDE, which is a Firefox extension that lets you create tests by actually driving the web browser, which is good for user acceptance tests.

What is the single best open source automation tool for functional web...

testing integration-testing
Rectangle 27 0

You can't, and shouldn't, directly look in the database with Selenium IDE. You can, and should, indirectly test that the transaction happened.

When you use Selenium, or any other browser controlling or simulating testing tool, you're testing your app from the user's point of view (writing a 'functional' or 'acceptance' test). Users don't know what's in the database -- they just know what they see on the screen. So if doing something in your web app changes something on some page of your web app that a user can see, go there in Selenium and test that.

This is the right thing to do even if your testing tool does have a way to look in the database.

If your app writes some kind of information to the database that is never shown to any user, such as auditing information, the only way to test that with Selenium IDE is to add a page (appropriately authenticated!) to your web app so that Selenium IDE can see it. If you aren't able to do that, you need a testing tool that can look in the database.

RSpec and Cucumber, with the Capybara Ruby gem, are examples of testing tools that can both test an application through its user interface and also look in (and even change) the database.

mysql - Can I test that a transaction has been added to the database w...

mysql testing selenium selenium-ide
Rectangle 27 0

  • i dont see a problem, you can create a brand new browser instance everytime before you start a test, there you can choose if it should be IE, Chrome or FF. You can use parameters for your testclasses, they will be checked in the @BeforeTest and the according browser is opened.
  • groups are supported by TestNG and jUnit, I would prefer TestNG because its more flexible
  • only selenium 1 had a step-by-step logging, afaik selenium 2 does not support any of it. What I did was create a new class "TestElement" which provided selenium method with logging. There I just created a new assertThat which logs fails and success public static <T> void assertIt(String reason, T actual, Matcher<?> matcher) { Description description = new StringDescription(); description.appendText(reason).appendText("Expected: ") .appendDescriptionOf(matcher).appendText(", Actual: ") .appendValue(actual); String desc = description.toString(); if (!matcher.matches(actual)) { TestLog.log(desc, TestLog.LogLevel.FAIL); throw new AssertionError(desc); } else { TestLog.log(desc, TestLog.LogLevel.PASS); } }

testing - How Selenium handles 3 necessary problems - Stack Overflow

testing selenium junit automated-tests testng
Rectangle 27 0

No it's not possible. Selenium IDE takes over the firefox control. And this is similar to 2 users clicking into same window.

For parallel run you can setup Selenium grid. But it's more complicated solution than Selenium IDE.

java - running multiple test case in Selenium at the same time - Stack...

java testing selenium