Hot answers tagged

14

Writing unit tests is not difficult - as the saying goes, it is matter of simple programming :-) So if you are competent programmer, and are willing to learn necessary skills and patterns, you can do it as QA engineer. But IMHO (and best practices say that) developers are much better suited to write unit test - because unit tests use internal calls to ...


11

The right time depends on the development process you are following. Using a simplified interpretation of an agile process would probably work best - pretty much anything that preaches interative development with fast & often builds + test execution after every build will do just fine. One thing to have in mind is Test-driven development which mandates ...


10

I don't know whether a certification is necessary for automation testing, but you definitely require good coding skills and logic development skills for it. Its advantageous to learn Java as its open source and hence there are countless forums and communities to seek kelp. Plus many of the automation testing tools (specially open source testing tools) use ...


9

I have had some luck using Grinder. It is Java based but you can also write your scripts in Jython or Clojure. You said that you would like to take advantage of your team's current Selenium scripts and expertise performance testing. You did not describe your regression test scripts, but you may want to reconsider whether they are appropriate. In ...


9

Look at the Wait commands rather than sleep - a search on this site or Google will give you lots of examples


9

It's certainly possible - that's the way I and many others here became testers. As Som Ghosh says, you will need to mention in your applications for test positions that you have worked in testing as well as development. I'd suggest you include details of the kind of testing you've done and the scale of the projects that you tested. I would recommend that ...


7

I assume that you are not using stand-alone jar of selenium. Can you download Selenium Server Standalone jar and use it in eclipse. This is the only jar you need from selenium-java as it encompasses all required class files. You can remove other Selenium related jars from your eclipse.


7

TestNG is appropriated for functional testing (and unit test, by the way). For performance test, Grinder is probably a good choice: http://grinder.sourceforge.net/ The Eclipse plugin: http://code.google.com/p/grinderstone/


7

Try Jmeter to test performance of your app.


7

Link to my blog where I discuss this in more detail. Inconsistencies here, are you using Selenium IDE or WebDriver with Java? Assuming you are using WebDriver with Java and not Selenium IDE(as you state in your post) You can try using: /* * Copyright (c) 2010-2012 Lazery Attack - http://www.lazeryattack.com * * Licensed under the Apache License, ...


7

See, you can learn Selenium with any language, whether it is C#, Java, Ruby, Python etc. It doesn't matter whether the application you are going to test has been developed in the same language that you would use to write your test scripts, you can test an application developed using C# in Selenium with test scripts written in Java. In addition to that, you ...


6

If you are looking for automated UI testing using java then Selenium is worth having a look at....


6

SoapUI is a nice tool to test (not only SOAP!) webservices, define several types of assertions on the responses, build functional tests and also derive load tests from functional tests. As a (super nice) plus, mostly everything in SoapUI can be scripted with Groovy, which allows for even more flexible testing, and finally, there is also a Maven-Plugin ...


6

Java My experience is, that the basics of Java suffice to start developing test cases with Selenium 2 / WebDriver. Myself started developing of Selenium test cases with a basic knowledge about Java. The more test cases I wrote and solutions I had to find, the more I leaned about the programming language. Unit Testing Framework (JUnit, TestNG) Write some ...


5

JUnit is also an option if you want to test functionality.


5

This sounds similar to a problem I dealt with recently using watir-webdriver (which, if you're using webdriver will be similar). In my case I was able to resolve/ workaround by sending a click at the element (to select it) before using sendKeys. So I suggest you could try sending a click to the element before using sendKeys. :)


5

In your comment you mentioned that the element is within a <frameset> \ <frame>. To work with any element within a frame, you need to first switch the context of the driver from the main page to that frame: driver.switchTo().frame("foo"); In this example "foo" would be the name of the iframe. You can also do it by index if the frame has no name ...


5

There's a good thread here on Stack Overflow. Their answer is to use java sockets: Socket socket = null; boolean reachable = false; try { socket = new Socket(hostnameOrIP, 80); reachable = true; } finally { if (socket != null) try { socket.close(); } catch(IOException e) {} }


5

For testing it, your doing an extremely basic test. A major advantage of automation is that you can do a lot more testing. I would set up a datasource for names, declare them valid or invalid, and have it attempt to use it. I would also have it only use one of the special characters at a time and the rest be valid (As of now your essentially testing if any ...


5

How to get started with Selenium: A Brief Overview So you want to automate browser-driven tests, and you're not sure where to get started. You've heard of this "Selenium" thing, and you think it's what you want, but you can't be sure. Fret not! Here's a quick rundown of what you're looking at and how to get going. This is mostly adapted from two sources: ...


5

A perspective from a developer: A unit test is best written in conjunction with the code it's testing. It will shape the code to some extent: the need to write a test forces the code to be easily testable, which limits some code smells/anti-patterns. For example, a method that directly calls the database to obtain a user name will be hard to unit test until ...


5

Put all the tests into a code version control system. Preferable in the same version control system as the application under test works with. This way the tests are version-ed with the code it tests. This way you could go back in time and build the application and run the tests against it. You will need this if you need to support multiple versions of the ...


5

I am assuming that you: want to become competent programmer, with goal to learn programming beyond Selenium automation. have nobody around to ask for guidance (if you do, ask locally) also want to be able to write simple tools supporting QA tasks, and beyond. Python is widely considered as best language for beginners (MIT among others). It works much ...


4

org.testng.Assert.fail("you wandered onto the wrong path");


4

You can use WebDriverWait to synch with page load. Something like the following might help WebDriverWait wait = new WebDriverWait(driver, 15); //you can play with the time integer to wait for longer than 15 seconds.` wait.until(ExpectedConditions.titleContains("title")); //if you want to wait for a particular title to show up OR ...


4

Try to use driver.findElements instead. It returns a list of all WebElements. All means also the not visible elements. Here some code to iterate thru the list and only do something with the displayed items. List<WebElement> elements = driver.findElements(By.className("vfmThumbnail")); java.util.Iterator<WebElement> i = elements.iterator(); ...


4

Implicit Wait: An implicit wait is to tell WebDriver to poll the DOM for a certain amount of time when trying to find an element or elements if they are not immediately available. The default setting is 0. Once set, the implicit wait is set for the life of the WebDriver object instance. WebDriver driver = new FirefoxDriver(); ...


4

I have this code running always when I instance IE8 on my tests. Works fine for me. #region SSL workaround for IE if (driver.GetType() == typeof(InternetExplorerDriver) && driver.Title.Contains("Certificate")) driver.Navigate().GoToUrl("javascript:document.getElementById('overridelink').click()"); #endregion


4

Well the reason you are getting so many different matched is because you print it as you go through the loop. My personal suggestion, I like the KISS method, change the code to something like the following: public class Ex1 { private WebDriver d; @Test public void testUntitled() throws Exception { d = new FirefoxDriver(); ...


4

If your using Java, here is the JavaDoc If your using Ruby, here is the Ruby Docs If your using Python, here is the Python Docs If your using .Net, here is the .Net docs This will contain all of the functions that Selenium uses.



Only top voted, non community-wiki answers of a minimum length are eligible