1

I want to learn to use Selenium in my tests. Do I need to know how to use SQL in order to effectively use Selenium in my tests?

And would you be able to advise what online resources are freely available to learn these skills?

2

3 Answers 3

2

To automate tests in Selenium you don't need to know SQL at all.

However, knowledge of SQL helps in general in testing and test automation, for instance:

  • finding useful test data
  • automating test data setup
  • checking intermediary results (e.g., whether a user has been locked in DB) of your tests
1

None.

SeleniumHQ define Selenium simply as a tool which automates browsers. You can work with Selenium without any knowledge of SQL.

However, you could combine Selenium and SQL to run more advanced and thorough tests - for example completing a web form with Selenium and then confirming the data's been saved in the database by running a SQL query.

If you need to run SQL queries within your automation tests, then I'd recommend learning this with MySQL as it's free and the syntax is very similar to SQL. You'll find that SQL is actually rather easy to use, especially if you're primarily selecting or inserting data.

1
  • Thank you for answering my question Edward. I have knowledge about SQL queries as practiced some on w3schools.com
    – Jay Peris
    Jun 27, 2017 at 1:23
0

Best database to know is the one used in your company/project. If your company is Microsoft shop, likely it would be MS SQL Server. Other companies insist on using only open source tools (for very good reason), so it will be PostgreSQL or MySQL. For some apps, SQLite is enough. Yet other companies will not stray from Oracle, because they invested lots of resources to use all the optimizations it allows. And sometimes you may need NoSQL database like MongoDB.

Most companies have good business reason to use the database they use, and will not switch to another without really good reason.

Let me ask you (OP) similar question: what is the best car?

It is not answerable because you need to know if you want it to commute to work (Prius?), going for family trips (minivan?), or deliver packages (big van?).

0

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