Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I am trying to evaluate the right tool to test RESTful Web services and eventually automate the same for our project.
Wondering, what are the specifications I need to look for such test, when i compare various tools on internet.
Definitely, one of the requirements would be an Open source tool.
I have looked on few tools, such as SOAPUI,RestClient,TestMaker, RestAssured. Wanted to know the pros and cons of them. Also, any ideas or pointers on how to go about it would be of great help.
if you want to test from browsers,
use
POSTMAN -> Chrome
Rest Client -> Firefox
If you need an online tool or require automated API testing,
use
Runscope
If you're looking for aa HTTP client (GUI) to test requests, I'd mention:
Paw, a native HTTP client on Mac that supports most of the popular authentication schemes, has full encryption and obfuscation of your server credentials and dynamic values a special feature that lets you sent back a field from a previous request (e.g. an auth token) or compute the hash of another part of the request. Also generates cURL or client code. (disclaimer: I'm the founder of Paw)
Postman, a Chrome app and a web wrapper for Mac that lets you send requests to servers. Generates cURL and client code. Cross-platform (web app). Has a cloud service for sharing of collections.
Insomnia, a Chrome app but with a really nice interface (a design I like). It feels like the author cares about UI and design. The feature set isn't as complete as Paw or Postman though.
HDC Client, Chrome app, quite old but Restlet acquired them and it seems like it's more active on the development. As test features like Postman.
Advanced REST Client, a Chrome app, similar to previous ones. Seems still quite popular but isn't very updated.
RESTed, a native Mac app, a very small feature set, just lets you test one request at a time. I mention this because I like the native feel (alike Paw) and I think it's a good alternative for those who just want something simple.
Also, you may consider this command line tool:
HTTPie: For a command line too, I personally love it. It's beautifully made, and easy to learn. Clearly not as handy as a GUI, but really worth a try.
I'd also recommend you to read through this list of tools I've made a few months ago: Tools that will help you develop a RESTful API
If you need complex parametrized soap and rest webservices testing and test automation, you definetly should try soapui. It is open source (https://github.com/SmartBear/soapui), free in base edition tool with great documentation. In addition to webservices tests it provide scripting, load testing tool, ide support, web services mocking, running tests from GUI or console and much more.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I want to make an e-commerce web app, where at the backend I am using Django and Django Rest Framework.
I want to use React, Redux and React-Router with axios library at frontend. I found-out that these are two other framework for React i.e. Nextjs and Gatsby.
Now, Which one will be better for me to make an e-commerce web app between Nextjs and Gatsby?
And, Is it necessary to use Redux, React-Router with Nextjs and Gatsby?
It all depends on, what are the important performance related features you want to have in your app? I assume you have the basic understanding of how these both frameworks work. Still, I'll try to make it as brief as possible.
NextJs uses Server-side rendering(SSR) which is good for your SEO and initial site load. It uses a concept of pages, meaning each page is in itself a route. So you don't need to implement React-router separately. It has it's own routing mechanism which can be found in here.
Gatsby is a static site generator tool. A static site generator generates static HTML on build time. It doesn’t use a server. Gatsby uses GraphQL which is a query language and if you’re familiar with SQL, it works in a very similar way. Using a special syntax, you describe the data you want in your component and then that data is given to you.
The fundamental difference is, NextJs requires a server to be able to run. Gatsby can function without any server at all. Gatsby just generates pure HTML/CSS/JS at build time, whereas NextJs creates HTML/CSS/JS at run time. So each time a new request comes in, it creates a new HTML page from the server.
And yes Redux implementation is consistent across these platforms and other state management. Though the Gatsby needs some plugins to get started with it. NextJs setup is similar to create-react-app's. And it entirely depends whether you want to go with redux or not. It has a specific use-case. Nowadays, you have partial solutions for these use-cases i.e contextAPI, hooks etc. But still you need redux for many others, where these limited solutions won't work.
So, If your back-end is in GraphQL, I would recommend to look into Gatsby, it provides some of the powerful solutions for front-end. That said, I would recommend you to go on with NextJs, if you are using any other back-end architecture. I myself had implemented an e-commerce site in NextJs and I must admit It was a great working experience for me.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I start to test new project, and the developer send API services to me to test it because frontend(UI) implementation is not ready.
I have to write Automation scripts for features after stabilizing them
Is it possible to automate API services functionalities, and how plz?
or I have to wait untill frontend is ready so I can locate elements and automate through UI.
Can you please explain to me difference between
Automate through WEB UI vs through Automate API
It's definitely possible to automate API service testing without a UI, and in many cases it's actually preferred.
Is it possible to automate API services functionalities, and how plz?
or I have to wait untill frontend is ready so I can locate elements and automate through UI.
You can test the API separately from the frontend UI. Remember, all the frontend UI does is make requests to the backend API. So instead of using the UI to make API requests, you can use a tool like Assertible, which allows you to send HTTP requests to the API and make assertions on the response.
When you're testing an API, you'll want to validate things like status code (eg, 200), and the response body to sure you get the expected response.
Basically:
1) Send API requests (eg, GET /users)
2) Receive API response (eg, [{id: user1}, {id: user2}])
3) Assert the response status code equals 200. Or, assert that 2 users are returned from the API.
Can you please explain to me difference between Automate through WEB UI vs through Automate API
The big difference is like i mentioned above: when you automate testing through the web UI, you are simply using the UI to make API requests. To test the API by itself, you just send requests directly to the backend.
There's many different tools and services you can use to accomplish this. If you want to use a hosted service that doesn't require much code, Assertible and Postman are both great. If you want to write code, you can use pretty much language/library that allows you to make HTTP requests. In JavaScript, for example, Chakram and Frisby.js are both popular choices.
Hope this helps!
As a side note - testing an API separately from the UI has a lot of advantages. Namely, keeping tests small and isolated so that tests aren't flaky and can easily be traced back to a root cause.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I am new to web application design. It seems contemporary web applications usually take this form:
Front-end leverage various JS frameworks to built the UI.
Then front-end invoke back-end web services with JS to exchange XML or JSON data and update the UI accordingly.
Back-end is separated into tiers and expose Web service APIs to whatever external.
Web service APIs also exist for the communication among the back-end tiers.
So the web service APIs should be the critical part to design.
How do we design it? To be specific:
What data/materials are needed to start the design with?
What tools can we use? (I heard about some tools to convert XML into classes.)
And what does the final output of the design look like?
ADD 1
To be specific, suppose there's requirements like this:
Customer should be able to upload and delete certain files from the
file repository.
Customer must be authenticated before modifying the files on file repository.
How can I convert it into detailed API spec, and then concrete class definition?
A related link: http://piwik.org/blog/2008/01/how-to-design-an-api-best-practises-concepts-technical-aspects/
ADD 2 - Regarding RESTful
After reading some books, I came to this:
RESTful architecture is just one of the many ways to integrate
applications. It leverages Web standards in the hope of making the
integration simple and natural. Resources are identified by URLs,
manipulated with HTTP methods, and transferred in certain serialization
form at the convenience of the integrated parties.
To create a Web API (i.e. RESTful service), you need to follow REST principles. I think that this link could give you some hints about the design of RESTful services / Web API: http://restlet.com/blog/2015/03/16/designing-a-web-api/.
To be short, RESTful services should leverage HTTP methods they are designed for:
method GET: return the state of a resource
method POST: perform an action on the resource (creation of an element in a resource list, ...). Be careful not to use an action name within URLs (something like /elements/some-action-name) because it's not RESTful.
method PUT: update the complete state of a resource
method PATCH: update partially the state of a resource
method DELETE: delete a resource
You need also to be aware that they can apply at different levels, so methods won't do the same things:
a list resource (for example, path /elements)
an element resource (for example, path /elements/{elementid})
Other important things you must consider are:
To use status codes to tell the client if the request is sucessful (2xx family), fails because of the client (4xx family) or of the server (5xx family)
To leverage HTTP headers. For example, the header Content-Type for the type of content used (application/json for JSON for example) and Accept for content negotiation if needed...
Otherwise there are some formats like Swagger and RAML you can leverage to craft your Web API. A tool like Restlet Studio could a good help to create the structure of your REST service online, get the corresponding Swagger and RAML contents, and even generate server skeletons or client SDKs. You can notice that this tool only follows REST principles...
Regarding security, you need to leverage the Authorization header. There are several strategies:
Basic one. The username / password are encoded with Base64 and sent in the header.
Token-based one. You could have a look at this link for more details: https://templth.wordpress.com/2015/01/05/implementing-authentication-with-tokens-for-restful-applications/
OAuth2. See this link: http://www.bubblecode.net/en/2013/03/10/understanding-oauth2/.
Regarding file upload, you can leverage multipart contents. See this link: http://restlet.com/blog/2015/10/27/implementing-file-upload-with-restlet-framework/. We use the Restlet framework but you might pick up some generic hints...
Hope it helps you,
Thierry
In my opinion the concept of a Rest-full API is a little blurry, I would advise you to take a look at this article http://martinfowler.com/articles/richardsonMaturityModel.html
Not many public rest-full api's actually achive the discussed level 3. The general idea it to model your api around the "resources" your application deals in and respect the proper http verbs.
As for tools I kinda like https://apiary.io/ it helps you build an API and can provide mock responses as well
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I have a database which I consider to be my application and a website acting as a user interface for that application. It is now time to add more user interfaces to my application (phone apps etc).
Keeping this in mind, I have come up with a web service architecture to feed data to all my user interfaces. I would like to sanity check this with the brains on stack overflow. Btw - this is all Azure hosted.
Database, as is.
Core web service - this handles all important methods and invokes the main processes on the DB. For example, registration. This will also automatically queue emails to be sent, etc.
Web Services for each UI (website, phone app) - these are specific methods for the UI data calls - e.g. GetDataForRegistrationPage - specific to the website and not needed for the app. The app would have different requirements.
So far I think this is reasonable though I'm interested in your opinions. I would like a bit of help with the next bit: how they communicate.
I would like the Core web service to be a WCF Service that can ONLY be accessed on named pipe endpoints - ensuring that only the client web services can communicate with them (I can guarantee they are on the same machine).
I would like the Client Web Services to bind to their applications by TCP or http. The website will be on a separate machine but on the same network and so is a good contender for TCP. The apps will of course be on clients and would be best as http I believe.
I am worried that I've introduced too many steps with this design. Using registration as an example, the user would register using the website page which goes to the web server which would invoke the registration method on the website web service, which would invoke the registration method on the core web service, which would invoke registration on the database.
Thank you for your thoughts!
(I posted the below as answer but got told off. If we really want to be anal about this then I guess no one should have posted anything as answer as there is no real answer - I was asking for opinions, but anyway...)
Just in case it is of any interest to others having similar design questions. I have decided to get rid of the core service idea and just use a class library shared between each client service.
Pros: Easier to develop, one less complication (setting up named pipes seems impossible to me) and one less process to get involved (even if it is on the same machine).
Cons: Each service now HAS to be on Azure, otherwise it cannot access the Azure storage facilities. I will be using the queue to schedule emails. With the first approach I could have potentially hosted one service on a completely separate platform.
Feel free to comment with any ideas or observations. Thank you for the input, Ramiramilu and Markus.
Your approach seems to provide a good separation of concerns. Depending on the size of your project, it might be a bit too much. If you are looking for a way to simplify your architecture, here are my thoughts:
Client WebServices
I'd propose to analyze how big the differences of the Client WebServices really are or whether it is possible to set up a common service for all clients. Even if you were able to move a lot of shared code to the Core WebService, you'd have to implementent very similar interfaces over and over again. Of course this implies that there won't be a specific WebService that is tailored to the needs of a specific client. If you build on WCF, you can also offer services with different bindings so that e.g. the WebSite accesses the service using a NetTcpBinding whereas another client communicates with the same service over a SOAP interface (WebHttpBinding or WSHttpBinding whichever fits your needs). This would be much more efficient because you'd not have to implement common building blocks like authentication and authorization for each Client WebService.
Also you might want to have a look at ASP.NET WebAPI and consider building a REST API that should be accessible from all devices - though it is as efficient as a TCP binding. You could also host your Web API in the WebSite project so that you can use it both from other client and for AJAX requests. As your WebSite is accessible from the internet anyway, this is also a good approach from an infrastructure point of view.
Core WebService
You could substitute a class library for the Core WebService. The Client WebService(s) can integrate this much easier without having to deal with additional complexity, e.g. for authenticating at the Core WebService.
As you want to host the Core WebService on the same machine anyway, I'd only build a service if there is a strong reason for it. I can't come up with one now.
Conclusion
If your requirements are only to add some clients with a limited set of capabilities, I'd suggest to add a Web API to your WebSite project and access it from the other clients. See this link for more information.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I am new to SoapUI. I have to learn about soapUI ie: How to write a simple soapUI test and how to execute it and all about the results etc.
I have no idea about soapui as of now. So please tell me what is the purpose of a soapUI, how a sample soapUI scripts look and what are all the pre requisites for executing a soapUI testing.
This is a pretty open-ended question but I'll try and answer it with some basic pointers to get you started.
SoapUI is a good tool if you want to test a service dealing with http calls, like rest or soap.
Create a new project and right click on it on the Navigator view on the left. Depending on weather the service uses a wsdl (soap) or wadl (rest) you can add the location of yours to populate a list of resources defined by the wsdl/wadl that you can then use to start putting together tests. For example if you had a wadl that specifies POST/PUT/GET/DELETE operations, resources will be created for these calls. You can then create test suites/cases that use these operations. First figure out where/how you access the service you want to test, then try and get those resources plugged into a new project and try and make a call of some kind to the service. If you can get the service to 'do something' through soapui, you'll be well on your way to figuring out how to use it to setup full tests.
SoapUI is a functional testing solution which can be used to create and execute automated functional, regression, compliance, and load tests for webservices created with .NET, J2EE, Perl, PHP, etc.
It does have some less resources online but the Getting Started Page on SoapUI helps a lot.