Tag Info

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


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 application which you are going to test has been developed in which language, you can test the C# application in Selenium with Java. In addition to it, you don't need to learn any of these language completely for working with automation. You should know ...


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

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

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

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

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


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

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.


4

Sadly, it sounds like using the ID is not an option in this scenario A lot of websites implement security to prevent automating. While this makes your job more difficult it does improve the security of the application. So what can be done to bypass these security tricks? Use a different unique constant for that element This could mean using the class, ...


4

You mean to say in one class multiple methods you want to run, then use below code and try. @BeforeTest public static void beforeMethod() { driver= new FirefoxDriver(); } @Test public void main1() { driver.get("http://indianrail.gov.in/pnr_Enq.html"); driver.findElement(By.id("element")).sendKeys("1234567890"); String ...


4

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


4

When working in teams one of the most important added value of code-reviews is knowledge sharing. This leads me to think that other developers on the team should do the reviews and not testers who do not add code to the code-base. I suggest you read the free (relative short) e-book "The best kept secrets of peer code review", its totally worth the read if ...


4

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


3

This question comes up a lot. Here is a possible solution, but it will require some additional development. You could use a customized HTTP proxy that acts as a pass-through filter except when it sees an HTTP 401 response. In the latter case, the proxy would respond with authentication credentials of your choosing. Here is how you might do it, in steps: ...


3

The combo of JUnit and Selenium would handle most if not all of your needs, especially if your app is browser based.



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