Need suggestion for API and GUI test automation tool - testing

I have been going through many tool, but not able to conclude.
I have been using HP UFT for sometime and it's quite OK for my project but for some reason we need to find alternative to HPUFT with some advantage.
I have been exploring tool like selenium, IBM tools.soap ui
Could anyone suggest me test automation tool with advantages , so that I can explore.
My scenario,
More REST API based validation.
Need to make REST call and parse the response for validation.

From my experience, it all depends on if you are comfortable coding then you can use REST ASSURED if you are not too comfortable with coding then there are tools like POSTMAN and Ready API (SOAPUI) Which you can automate with very well which comes with loads of assertions.

Since you are testing REST API and validating result, I would not any testing related to UI here. So Selenium ruled out if there is no web UI involved.
For rest API I would recommend you can use Java with Junit/TestNG. Where you write keywords in Java and use the same ones to write Junit/TestNG tests.
Another alternative could be RobotFramework, for which u can have keywords in python.

Related

How to use Robot Framework Scripts for Load Testing or performance testing

I have python scripts which are based on Robot Framework and were generally developed for Functional Testing. How can I achieve the Load Testing?
How to approach this problem? should I use Jmeter in order to run load testing (if yes then how is it possible) or there are some other methods available?
If you're a programmer and your team has a good culture of software and code review.
Instead of Jmeter, you have another choice Taurus
Taurus can consume configuration files written in JSON or YAML. But it also supports Jmeter.
It will be easier for code review and construct your own load test.
Some material you can read:
YAMLTutorial:
https://gettaurus.org/docs/YAMLTutorial/
Automating Performance Tests with Taurus:
https://www.youtube.com/watch?v=DN0VNnG-lzs
Simple load test example with Taurus:
https://medium.com/#s6307/how-to-design-a-good-load-test-with-jmeter-and-taurus-like-a-pro-part-1-1d1b32fd77be
You might want to consider using rfswarm, as it's designed exactly for this purpose:
https://github.com/damies13/rfswarm/blob/master/README.md
In the documentation there is even some details about things to consider when adjusting your robot files for use in performance testing.
Good luck with your project and i hope this answer is not too late for you.
Dave.

what is an automation test

Could someone explain what an automation test is and why I would use it. I read from the wiki page that a tester would create a automation script? What kind of scripting language can be used to do this?
Automation tests are carried out to check the behavior of an application against expected behavior. Normally used in regression testing where you validate that a newer version of the application doesn't hinder any of the previous version's features. These might also be carried along with manual testing.
Coming to the scripting language part, this might help you:- https://softwareengineering.stackexchange.com/questions/19292/best-language-or-tool-for-automating-tedious-manual-tasks
In simple words, If you are doing regression test or testing same piece of code over and over you can automate that manual process. That's called automation testing.
You can use several different scripting languages to achieve this and it's depends on which tool you are using. Some popular automation tools are Selenium, QTP, Loadrunner, Jmeter, SOAP UI etc.
You want to check your login with more than 1000 of users how much time you will spend to run this test case ?
In the same way you want to test you mobile API's before it used by developer how will you test?
There are lots of thing for that you have to go for automation In small application, sites you can work as an tester after that when those app's sites will grow will large data than those product owner will move for automated test cases

What are you specifically automating in UI test automation?

All the documents I have read so far on various testing frameworks (Selenium, Tellurium, Canoo etc) encourage (or at least concentrate) on functional testing an application through UI. I have seen very less on the below which I believe are most important ones
localization testing
usability testing
cross browser compatibility testing
testing against multiple versions of the same browser
xss/sql injection
validation
Is the UI/presentation layer calling the correct service layer API (service layer being tested thoroughly through component based testing)
So here are my questions
1) What are you specifically automating in UI test automation?
2) Which UI testing framework can meet all the above items?
I have used Selenium in the past and it works great for all of the 1-7 except maybe localization since I did not have to test that. As 2, the applications I have tested were mostly just "write something in textbox and see if it works", so it was quite easy. And, for 4, I had multiple virtual machines with only specific browsers installed. It was hackjob, but, worked, sort of.
Automation projects till now is not that mature to incorporate all the points you mentioned. Majority cases automation is used to test functionality through UI. Also backed up with unit testing to have more coverage on Functional part.
Framework, there will not be any ready to use framework available. But there are tools which has these capabilities, like eggPlant (TestPlant). Generally industry follows is hybrid kind of automation. Like use jmeter to fire number of REST calls and check response. Which will cover client-server calls. And use selenium kind of tool, to check Client UI.
For Cross browser, cross platforms Selenium Grid with junit framework can be formed easily.

Selenium vs XmlUnit+HttpClient for web REST API testing

I need to test web API functions in REST format. Currently using Selenium RC for functionally testing the website. And using XmlUnit and HttpClient to functionally test our REST API. But it seems life would be easier if we could really separate our functional testing code into all selenium. Particularly with Selenium 2.0's WebDriver, it looks easier than ever to test XML responses using XPath.
My thoughts in the Pro XmlUnit+HttpClient camp:
allows easily testing with direct database calls or Spring beans
more easily allows testing JSON responses when/if we support that in the future
selenium was meant for web UI, not REST API testing
My thoughts in the Pro Selenium WebDriver camp:
separates out the functional testing all into standard selenium tests
easily test results by using our other selenium UI tests, further testing the UI
allows others than core developers to review functional API tests
maybe easier to use services like BrowserMob, which uses selenium tests, to load test API?
hopefully quicker functional tests with selenium framework
We're using Spring 3 and hibernate. What's best for functionally testing our API?
Another option might be to use REST Assured, a Java DSL for testing REST services. It allows you to write unit style tests with little boilerplate code for both XML and JSON. Additionally, it provides more advanced features like authentication, XSD / DTD validation, response codes, cookies, etc. More information is available at their usage page.
Disclaimer: REST Assured is an open source project initiated by a colleague of mine.
If you want to do real functional testing on rest API's, then I can recommend Fitnesse with this fixture: https://github.com/smartrics/RestFixture
Selenium is just a poor choice for this kind of thing.
As for performance testing you can knock up rest API tests in Jmeter in a matter of minutes, no need to pay a 3rd party.
Testing an API does not sound like functional testing but more like unit-testing. So I'd go for XmlUnit+HttpClient

Is there a good testing tool for web interfaces with support of VBScript?

I have to performs testing on an old legacy tools that's web based and make a huge use of VBScript, rather than JavaScript. So, yes, it's a IE-only tool.
Usually, I tend to use WebTest to performs such testing, but it does not support VBScript, making it unusable in that case.
So, is there a testing framework that support VBScript? (please, please, please!!!)
There is a commercial tool called TestComplete that lets you do Web testing using VBScript. See web page for more details.