Take the 2-minute tour ×
Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. It's 100% free, no registration required.

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

4  
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 at 11:47
1  
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 at 23:05
2  
This question appears to be off-topic because it is about reading Excel files with Java –  Niels van Reijmersdal Jun 11 at 15:10
    
Agree, off-topic. @obulisaravanan - this question on Stack Overflow might help stackoverflow.com/questions/1516144/… , or you can just search for "read excel java" for a lot of different results: stackoverflow.com/search?q=read+excel+java –  testerab Jun 14 at 5:11
add comment

2 Answers 2

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
add comment

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
add comment

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