| || |
Tool selection for a specific project
First of all, I am not sure whether or not it is allowed to ask this kind of questions. I read the beginner's guide and decided to take a shot.
I have been working as a testing member of projects for 3 years but that was only for GUI testing. the concept of my work was as first determining the test scenarios and then executing them manually on the browser each and every day.
Now, I am assigned to a new project and the project manager wants to handle testing in an automated way. Let me explain the project first:
Before I joined the project, they tried Selenium but they told me they had difficulties with the PrimeFaces components because everytime they make a new deploy, the IDs are changing. I read somewhere that I can use xPath or CSS locators but I failed to succeed until now.
What I am given are:
1. Use Selenium and hire a professional. With guidance, integrate Selenium with the project
2. Purchase a commercial testing tool (like Borland Silk, Test Complete etc.) along with counseling?
3. The main target of testing is PDF validation. Assume you logged into the application and created the document. After everything is done, the PDF is created by the application. If we can somehow validate the PDF we can identify many problems (such as auto-number generation, department selection, assign staff etc.) Is there a way to accomplish this?
We basically aim to use Selenium because it is free but I am not sure if its features are sufficient for our application. If it is not, we might purcahse a commercial product
What do you suggest?
ps: Please forgive my bad English. If anything is unclear, please ask and I will explain in detail
Originally Posted by iso9001
2. If your purchase a testing tool. I think it should be because of technological limitations, such as the need to automate active X plugins or Flash. Commercial tools will not make things any easier/harder in regards to object IDs. But it will give you some easier record/playback ability (which is usually horrible when id's change), but in exchange for record/playback, commercial tools are harder to scale to do massively parallel tests because of costs.
3. If you use selenium, you'll need to figure out a different way of verifying PDF's. Selenium only does web pages, so you'll need to supplement with another API/Library that can process PDFs for your verifications.
Thank you Mr. David. Actually, I was expecting you to answer
Originally Posted by dlai
1. I know that I should use locators. What about xpath? Would xpath locator help me or is my best shot css selectors? Do css selectors change in every deploy? I mean, if the IDs are changing over run time, will it be the same for css? Do you know any clear tutorial for Selenium css and/or xpath selection?
2. In this case, it looks it is better to use free tools. ID problem can be solved, therefore, since implementing the testing scenarios will not be easier for us when using commercial tool, our best option looks like Selenium, doesn't it?
3. Is there any library API/library for verifying pdf that is compatible with Selenium? If we embed the pdf into browser, will Selenium be able to process the pdf page?
Thank you for your time and detailed answers
Originally Posted by iso9001
There are also browser plugins that can assist you in finding xpath and CSS selectors.
2. I like Selenium for it's scaleability and cross browser abstraction. My current setup is I have a single test written, but have multiple build plans that run in parallel using Selenium Grid to run the same test over a combination of different browsers (IE8-IE11, Chrome latest, Firefox latest, Safari 6-7) all at the same time, and also split into several suites that too run at the same time (so I'm running nearly 3 VM for each platform setup). I try to use free open source when I can, to minimize the licensing costs to just the OS and VMs.
3. It's just a matter of doing a simple google search of "PDF API for <insert programming language here>", and taking a look at the handful of results. For example, if you're using java, Apache PDFBox | A Java PDF Library, if you're using Python, pyPdf
In the selenium forums, most people make the mistake of searching, "Email testing with Selenium", where instead they should search on, "Email API for Java". Selenium itself is an API. Things that live outside of the browser, is simply a matter of finding other APIs that work with the programming language.
Thank you very much Mr. David, these are really precious information. I do appreciate and I will follow your instructions to the end
Can you please direct me to the best and most comprehensive Selenium tutorial(s). I know googling will give me lots of sites but i wonder your favorites. Also, I will deeply appreciate if you can tell me the most important tips&hints while using Selenium based on your experiences
I have one last question, I hope you can answer:
Is it possible to do everything that can be done with java coding, by using Selenium editor? I mean, I am not really familiar with coding. Do I need to have strong coding (i.e. java) skills in order to use Selenium to its full extent or does its editor provide enough?
I mainly plan to use the Selenium browser editor. However,if it will not be enough I might follow another path.
Thanks in advance
You might want to just browse the Selenium forum for recommendations. I sort of picked it up on my own since I came in with a background in Unit and Integration testing. The idea of Selenium WebDriver is you have a set of API calls around the concept of web elements. So you basically spend most of your time either trying to find/select a web element, or performing a method on a webelement to simulate user actions or verifications. Once you figure out doing those 2 actions, the rest is just coming up with different ways of applying that idea to tests.
For the last several months, I just follow along some of the tips from this news letter, Elemental Selenium: Receive a Free, Weekly Tip on Using Selenium like a Pro, they have an archive of past tips which pretty interesting recipes. The SauceLabs blog is also a good place for recipes.
These have been really helpful. I am now clearer of what to do next.
I will start with tutorials and Selenium IDE, start with basics and then move to the more advanced actions. The I will switch to Selenium 2 for more flexible and advanced features. Next somes the Grid. A consultant will also be helpful, thus, I will talk to my boss and convince him to hire one.
Is this strategy O.K. or should I adjust it?
You probably want to skip Selenium IDE part. That product is about to be discontinued, and will not be maintained by the core Selenium team anymore. Selenium IDE will still be open source, however right now the core Selenium team is in the process of separating all Selenium IDE related items from the main core base so it can be spun off as a new project, and the Webdriver project can move ahead.
Originally Posted by iso9001
Sorry for being late, I could not find Internet access.
Thank you very much Mr. David, you have been very helpful.