Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using Selenium WebDriver with Java.

I have an Excel spreadsheet with two columns, one for username and another for password. I need to read those values and use them to create new users.

share|improve this question

closed as off-topic by Niels van Reijmersdal, Kate Paulk, testerab Jun 14 '14 at 5:12

  • This question does not appear to be about software quality assurance or testing within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

Have you searched online? This seems to me the kind of basic task (reading values from a spreadsheet) that would have many examples you could use as a guideline. – Kate Paulk May 12 '14 at 11:47
As I see it, this question is not about testing, but (as Kate Paulk mentioned above) about reading Excel file in Java (and then possibly filling two fields with read values), which is extremely basic homework task and should not polluting signal in exchange. – Peter Masiar May 12 '14 at 23:05
This question appears to be off-topic because it is about reading Excel files with Java – Niels van Reijmersdal Jun 11 '14 at 15:10
Agree, off-topic. @obulisaravanan - this question on Stack Overflow might help… , or you can just search for "read excel java" for a lot of different results: – testerab Jun 14 '14 at 5:11

Well, it depends on the type of excel file. If it is a standard excel file, there is great instructions on reading them here.

If it is a CSV based excel file than treat it as reading a standard text file and do a comma (Or whatever delimiter it uses) as a split. Instructions can be found here.

After you have the data, I would personally store them to a hashmap or some other system to track the value pair and then loop through the hashmap (Key being username, value being password) using a .keySet() and then check for those values.

share|improve this answer

I wrote an example project that uses Java and runs your tests on SauceLabs. In this example I drive the tests from a .CSV spreadsheet. You could easily edit this project to do your required testing and then you can hook the test up to a Jenkins job to run them on a scheduled basis.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.