We have a Postman collection. We want to verify data created from API in web. One way is we can integrate both in jenkins, but we want to perform all verification through nightwatch only. Is there any way to utilise Postman collection in Nightwatch?
In terms of using postman ‘in’ Nightwatch, you wouldn’t be able to do this I believe and I wouldn’t recommend it if you could.
If what you are saying is you want to be able to make api calls from within Nightwatch, then that is certainly possible and I’d recommend trying something like axios
Related
A normal use case in Postman seems to be to generate a collection from an API. This lets you do things like importing an externally defined API, and then generating a collection of calls that you can then make from Postman. I have the converse situation. I have a complete Postman collection from an API provider, but no API definition. Is there anything like "Turn this collection into an API definition." in Postman?
I recommend starting here - https://github.com/joolfe/postman-to-openapi but we are also working on other solutions at Postman as well--stay tuned.
I've built a tool that allows you to do this for a GraphQL API. (https://www.npmjs.com/package/graphql-testkit)
You could simply do something like this
graphql-testkit \
--endpoint=https://api/spacex.land/graphql\
--header="Authorization:123,x-ws-system-id=10" \
--maxDepth=4
and it would automatically generate the collection for you.
I have been working on a web app using .NET web forms. Now I'm trying to move to a Web API and a client side application. I'm trying to use Ember.js right now. I'm starting to get confused with Ember 2.0, Ember-Data and stuff.
My problem right now is that I'm trying to consume some of the REST services in order to show a list of things in my Ember app. Is it mandatory for me to use Ember-Data? If not, how can I consume the services to create, read, update and delete items (I mean, am I able to use only ajax or something)?
The Web API was built in order to be usable for many technologies. I need to build an specific URL for each request (even a simple GET has some mandatory parameters). That's why ember-data is not working well for me, at least not what I have learnt about it. Because this.store.find won't allow me to build the URL I need.
Greetings.
Is it mandatory for me to use Ember-Data?
No, it's not. You can use other libraries such as Ember RESTless, or write your own.
You can even use simple jQuery AJAX calls whenever you need to fire a request to your API, however, you'll loose many benefits of Ember Data, such as lazy, asynchronous loading of models when they are needed.
That's why ember-data is not working well for me, at least not what I
have learnt about it. Because this.store.find won't allow me to build
the URL I need.
You can override buildURL method of adapter you're using(for example RESTAdapter), source code on GitHub could be helpful if you would like to do that, and you can find everything you need to create your own behavior for buildURL method in Ember API documentation.
I am trying to build my own Sync Desktop application like onedrive to sync with a REST backend. MS Sync FW seemed to be a good base for that. Now my approach would be to use the FileSyncProvider to cover the local files and write another Provider - closely based on the FileSyncProvider for the REST backend. Is this a viable approach?
The deeper I get into the Sync Framework the more I think that I might to write two custom providers - my own LocalFileSyncProvider and a RemoteFileSyncProvider. Are there any good examples for something like that?
I believe you might need to implement only one simple custom provider, the one that interacts with the REST service. Then you can synchronize between the out of the box FileSyncProvider and your simple custom provider.
If you want more information on the type of custom providers, check the following link:
Choosing a Custom Provider type
The code sample that you are looking for is here:
File Sync with Simple Custom Provider Sample
I am new to Enyo and web services. I am looking to build a web page with Enyo that will require use of Echonest. Can anyone help me understand how to connect to the Echonest service from inside Enyo and whether to use SOAP, REST, or something else?
I assume you are talking about the Echo Nest found here: http://the.echonest.com ?
Briefly glancing at their API, you may not have to use SOAP or REST since everything is accessible with simple GET requests through the Web service. It looks like the hardest part of using their API will be generating OAuth signatures for authenticated requests.
As far as the enyo.WebService, http://enyojs.com/api/#enyo.WebService, goes, you should be able to include the kind, set the URL and call the .send() method on it. Then you response handler would get the data back (I recommend json) so you can do what you will with it.
Another option would be to use enyo.Ajax, http://enyojs.com/api/#enyo.Ajax, directly. enyo.WebService wraps that and provides a familiar (to Enyo 1 developers) way to use it.
What do you use as a test client for your stateful web services? Is it possible to use SoapUI? Are there best practices in this area?
You can do what's called a "Property Transfer" in SoapUI. For example, all our web services have to first call an authentication web service and obtain an authentication token.
I've set this up in SoapUI so that the returned auth token from the auth service is passed on to subsequent requests. It seems to work pretty well, but unless I'm missing a trick I wouldn't like to set it up for a lot of web services (i.e. you have to have an entry for each call you want to transfer data to / from).
Yeah, building SoapUI tests is slow, repetitive work. We didn't discover it until rewriting the SOAP server, and it makes great unit and system tests, but is s.l.o.w to create them.
Oh, and watch out for the memory leaks. Save very frequently. When you run out of memory, you can't save anymore. That sucks a little.
The property transfer stuff is awesome - you can have different scopes (test, request, global), and you can use GroovyScript to do dynamic stuff (like look up a particular date related to today's date, and so on).
With a properly formatted WSDL file, it will generate template requests for you, but you'll still need to tweak them a fair bit - or at least, I did.
I don't know whether it's practical to do this with SoapUI, but I've done things like this with both iTKO LISA and Parasoft SOATest. It wasn't for testing stateful web services, but simply executing multiple testing steps, storing results that are used in following steps. Both LISA and SOATest have the ability to define steps in the GUI that can store pieces of responses that are used in later requests.