What is the best way for automated front-end testing using GUI for a WebSite?
I have to write testing module to test whole website automatically using GUI whatever a user can do on website.
I have used mocha for testing the code but it does not provide GUI.
Benefits of Automated GUI testing GUI testing is mostly performed manually. However, while assessing the performance of small straightforward testers, a lot of developers write scripts for automated testing.
GUI testing is the process of ensuring proper functionality of the graphical user interface (GUI ) for a given application and making sure it conforms to its written specifications.
Manual Testing This approach involves human tester, where each screen is manually checked to validate each functionality by creating and executing test cases. It is a useful approach when part of UI or a feature is ready, the probability of defects is more at the initial stage, and human intervention is required.
It's worth to take a look on Selenium Webdriver.
This framework is one of the most popular for functional testing of web-applications.
Here are the most notable features of Webdriver:
You'll also find that a lot of 3rd party applications and services (like browserstack) have tight integration with Selenium Webdriver and ready to integrate with it out of the box.
Last but not least is Selenium Webdriver's community: it's huge and professional, allowing you to get answers quickly.
You can find more information about Webdriver on official web-site, and also browse blogs related to it.
As Viktor has noted, Selenium Webdriver is usually the tool to go to. In my experience, it is best to not use Selenium directly, but through a wrapper. Those wrappers take care of tedious timing issues that come with the asynchronicity of the web. Good wrappers are:
Most wrappers have the additonal benefit of making it easy to replace the selenium webdriver with others (e.g. Watir or Watin), if the need should ever arise.
WebdriverJS works well with Mocha, but if you are working with Angular you might take a look at Protractor, which ties all the tools well together.
For performance reasons and easy deployment on test machines you should take a look at PhantomJS, a headless browser based on Webkit.
Update: Pareshkumar's comment made me think. If you are looking for a GUI to launch the tests from, instead of a way to test the GUI of your website, the search term you are looking for ist testrunner. Testem for example is a testrunner, that has both a cli and a gui. You should definitely look for cli support to enable continuous integration.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With