Selenium and Database testing - selenium

I am totally new to the web application and automation testing.
I am learning selenium from youtube videos and developing frameworks.
while looking into the videos most of them cover only testing the Application as such.
I found very few videos which state about interacting with the database and verifying them.
I just wanted to know how will this be in real time projects?
In real time projects will they automating scenarios like configuring something in the UI, then validating it in the database, coming back to the UI and continuing the UI flow or will it be simply only verifying the UI.
I want to know more about how to do database testing.
Any info here will be of great help

Selenium is one of the best choice available in today's market when it boils down to Automation of Web Application. Selenium have support for Mozilla'a geckodriver, Google's chromedriver, Microsoft's IEDriverServer & even Safari etc. Hence Selenium is widely accepted as the best Web Automation tool as of today.
Having said that, though you too can perform Database Testing through Selenium but it's not the ideal candidate. Database Testing can include transaction rates & round-trip calculations for which there are other tools which does those work better and you may like to explore those as well. Alternatively, you can also integrate those tools in your Project Framework and work with Selenium in tandem.

Related

Selenium vs Cypress for tests that hit databases, elasticsearch, filesystem, etc

I am getting ready to start a new automation project and have done some reading on Cypress as a Selenium alternative. Given that Cypress apparently runs directly in the browser as opposed to Selenium's approach, is it difficult to perform test steps with Cypress tests that fall outside the browser such as communicating with a data store, interacting with services and interacting with product infrastructure such as remote file systems? With my limited exposure to Cypress, I have only seen browser tests so I was hoping someone could shed some light on this.
When it comes to automated testing for web applications, there are two main contenders: Selenium and Cypress. Both have their pros and cons, but which one is the best?
Selenium has been around for much longer than Cypress and is therefore more widely used. It is also more flexible, allowing for tests to be written in a variety of programming languages. However, Selenium can be slow and unreliable, and it is not as easy to use as Cypress.
Cypress, on the other hand, is a newer tool that is gaining popularity due to its simplicity and reliability. Cypress tests are written in JavaScript, making it easier for front-end developers to get started with automated testing. Cypress is also faster than Selenium and can run tests in parallel, making it more efficient.
So, which one should you use? It depends on your needs. If you need a more flexible tool that can be used with different programming languages, Selenium is a good choice. However, if you want a tool that is easier to use and more reliable, Cypress is the better option.
If you need access to things outside the browser, I would go with selenium. This is what I currently do, I have a webdriver wrapper which has "plugins" loaded so that I can make db statements, query the webserver and additionally issue selenium commands to the browser.
If you're looking for just test 100% within the browser, then cypress may be the way to go.
Alternatively, you could use selenium for workflow tests and cypress or even qunitjs for intra-browser unit tests.
In the app I work on, I actually ship a page which contains a qunit page with all of the in-browser tests. Then in a selenium test, in addition to the rest of the workflow, I browser to the qunit page and report on their status as well.

Automation testing between desktop and web application?

I am working on a retail based project. We have two UI. One is web portal where different types of vouchers can be created. These vouchers can be issued and redeemed from desktop application. The issued and redeemed voucher update details will be uploaded to web portal. I am using sikuli to automate desktop application. Can i do GUI testing between desktop and web using sikuli?
Thanks in advance.
As far as my investigation goes, testing end-to-end scenarios that involve both, we and desktop applications, Sikuli is the only option.
When making the decision there few limitation to keep in mind though:
Sikuli tests will only work on the same resolution screen as the one the tests were been created on.
You will need to have a physical computer switched on with a screen attached to it to work.
As it was mentioned in other post here, long scenarios with Sikuli can become brittle. So if you have an option to split your end-to-end scenarios into multiple standalone pieces, while using Selenium for the web part and Sikuli for the desktop app, that probably will be the best solution. Perhaps do some data preparation in one app and save data in a file, then run the other part and assert everything has worked as expected based on that text file.
Base of sikuli is to search the UI controls on screen, based on screenshot.
Also it provides Sikuli API for Java with which you can do a programming around the AUT.
To answer your question,
As long as it is GUI and it's expected screenshot can be taken, then Yes, you can use Sikuli to test Desktop UI & UI for the site opened in Browser.
But testing Web UI with sikuli is quite hectic process as you may need to take screenshots of every testable controls. It will be more cumbersome if site is heavily loaded with images and input controls.
We have selenium IDE/selenium webdriver to perform such testing.
You can use Sikuli on the desktop side where autoIT may become heavy job and the UI is quite static.

Cloud-based testing automation tools

I try to find a service which provides a functionality that allow me to create manual tests autmation for web-based applications in simple way with visual constructor without any coding, so it could be
simple in use without any coding on selenium or another framework tool
has option to set testing in schedule mode via the web interface to perform regression testing
has ID's validation and shows possible inconsistencies
The main point is reproduce manual tester's work without using automation scripts and do it in simple way in order to a beginner will be able to work with it.
So could anyone describe his own experience ?
There are two main options I would consider
to find a service which provides a functionality that allow me to create manual tests autmation for web-based applications in simple way
First one is BrowserStack and you can record your Selenium tests using the Selenium IDE extension for FireFox. It can export the recorded steps into your favorite language (C#, Python, ect). You can execute these recorded scripts on BrowserStack by pointing the hub URL to Browserstack's Selenium hub ‘http://hub.browserstack.com/wd/hub’ along with your username and Automate key. Your 'username' and 'automate key' can be found at Account --> Automate1, after you have logged in to your account.
I would suggest, you refer to the comprehensive documentation on BrowserStack Automate. It takes you step-by-step through the product and all its features. You can select the language you are using and get started with BrowserStack Automate. If you have any more questions, feel free to email at support#browserstack.com. They will be happy to help you out.
Second option is SauceLabs and the Selenium Builder. This is the docs that will guide you. Further more you have CI integrations for Jenkins and Bamboo.
You can use Selenium IDE to create your automated tests. With this Firefox plugin, you can record a test in your browser.
Once you're done recording, you can export the test and upload it to TestingBot. There you can specify the browsers you want to run the test on. TestingBot will then run your test across all the browsers you specified.

GUI Testing tools forBusiness analaysts

I have been looking around stackoverflow for automated GUI tools for testing our web app gui from a Business analyst point of view, so that means strictly requirements-record-playback kind of testing since we are not really programmers.
We have used selenium in the past but unfortunately it is no longer compatible with Firefox 4.
Is there a similar tool to selenium that allows recording and playback of GUI tests that does not require a lot or any scripting on a windows platform? thanks
You can use the FireFox add on compatibility reporter to get Selenium working on FF4
https://addons.mozilla.org/en-US/firefox/addon/add-on-compatibility-reporter/
Or alternatively drop down to FireFox 3.x and use that just for your testing!
For the server component Selenium-RC (necessary to execute tests), You must run Selenium-RC 2.0b3 (or higher if it become) to be compatible with Firefox 4. I have used it succesfully with FF4.
Selenium IDE, the recording tool, for firefox is indeed not available as a plugin for FF4 (but I speculate it will be coming soon).
I think that you can benefit from AutoIt (http://www.autoitscript.com/site/autoit/) I`d been using it to test Windows based GUI, but to the best of knowledge there are lot of scripts to test/play on-line games, thus it is applicable to Web Sites.
It does not require deep technical knowledge, but of course it will be much better and frequently mandatory to optimize the generated code. I`ve started my experience with this tool, and I was doing my work flawlessly.
At one company, I was developing automated tests for web app by means of TestPartner (Compuware company) it was one of the best tools Ive ever worked with, it generates VB code quite 'intelligently' and supports user with administration features. But Im not sure whether it is possible to use it without paying.
Good luck !

Visual Studio Web Test vs. Selenium

This can be a very opinionated question. Please keeps your posts factual.
What are the pros and cons of using Microsoft Web Test in Visual Studio? Conversely, what are the pros and cons of Selenium?
The major difference between Visual Studio Web Test and Selenium is how each tool works.
Selenium works at the UI level. Tests are recorded and played back against UI objects in the browser.
VS Web Tests work below the UI level. Tests are recorded and played back against HTTP requests/responses.
Depending on your context, one of these tools will be a better choice. If you are focused on functional test automation, requiring the use of the UI, Selenium is probably a better choice. If you are trying to load test, VS is the way to go.