Hot answers tagged

16

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 ...


12

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 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 ...


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

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 ...


9

The question and the description that you have written for it are misleading. I'm assuming you want to know which certifications will help you get a start for your career in Software Testing. Well for that I don't think you need to go for any certifications. Read good blogs and article on testing. There are thousands of them available on the internet. ...


9

Certifications don't teach testing. Still if you want to go for one, well, there are several available out there. But, they don't teach you how to test, they mostly teach only a certain terminologies. Yes, learning a programming language is an added advantage for a tester, especially for someone who is looking to make a career in automation testing or ...


8

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/


8

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.


8

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, ...


8

Yes, it is important to validate HTML. There are W3C standards against which you can validate it. You can use various tools like the W3C Html validator, or Web Developer addon of FireFox. There are several such paid an unpaid tools that can help you validate your HTML. It helps in page optimization and SEO.


7

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. :)


7

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


7

Try Jmeter to test performance of your app.


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

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

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 ...


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 ...


6

PageObjects The code of automated test cases should be easy to understand and not too complex. If a test fails, we want to know why and this as soon as possible. To allow this exists PageObjects. PageObjects are classes that contains WebElements and every actions associated with those. A PageObject looks like this: class HomePage { WebDriver driver; ...


6

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(); driver.manage().timeouts()....


6

One way is to use a singleton class like this: public class FirefoxDriverProvider { private static FirefoxDriver instance = null; public static FirefoxDriver getInstance() { if (instance == null) { instance = ... initialize FirefoxDriver here ...; } return instance; } } In your TestNG classes, you can do this:...


5

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


5

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


5

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


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

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 wait.until(...


5

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(); d.get("http://register....


5

Like many aspects of programming, it's not that hard to get started, and even to write something that looks like a test. The real difficulty lies in test engineering. If you know Java, particularly if you've used JUnit before, you can get started with Selenium in about ten minutes. If you know Maven, you can simply add the dependencies to your pom.xml as ...



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