How to change endpoint address for multiple tests? - soap

I know how to change endpoint for each test, but I have 100+ tests so I would like to select project/all tests and say set new endpoint. Is it posible?

Yes it is possible!
Double-click on your WSDL interface in the Navigator view on the left.
Then select the second tab called Service Endpoints. Select the desired endpoint (or add it first via the "+"-symbol) and click Assign. There you select All Requests and TestRequests.

You could also set up a 'centralized' endpoint prefix as described here: http://www.soapui.org/Functional-Testing/working-with-properties.html#4-example-n-centralized-endpoint

As far as I know there is no way to do this in soapUI itself. However you could try the following:
Save your project and close soapUI.
Open the XML file of your project in a text editor.
Search for <con:endpoint> which contains the URL for the endpoint.
Replace the endpoint in the text editor.
This, of course, only works if the endpoint you'd like to change is identical for all soapUI artefacts.

From soapUI 4.5 a new feature called "Environments" has been added to soapUI Pro. It is quite handy and pretty much allows you what you are trying to achieve here.
Once you configure all your environments and corresponding endpoints it is a matter of selecting environment from the dropdown when you run testSuite/testCase. You can add as many environments you want. This way you need not to update anything when you want to flip environment.

Related

Changing a text in multiple AEM pages at multiple locations

I have a website hosted on AEM. I want to change a text that is present in almost all pages (say I want to change my product name which is present in all pages) . How can i do it. It can either be a Groovy/Java code or an ondeploy script or anything else. Because doing it manually on all pages at multiple locations is not feasible. Will AEM Bulk Editor solve the purpose?
Its like Find and replace functionality in office
Yes, you will need to have a set of queries to find most of the references and then make a POST to these pages with the new value.
Example with: curl -u $USER:$PASSWORD -F"PROPERTY=new value" "http://$HOST/content/mysite/en/page/jcr:content"
Of course, you can do it with Java, Groovy (look for Groovy Console for AEM, which is very convenient), or even bash for simpler cases.
You can write a query using the query builder api to get all the nodes where your particular property is present.
Then once you get the path to that property you can update that using the node api.

Creating a folder from a space template via REST API

Well, I formuled this cuestion before but seems like I didnt do correctly, so I will try again explaining myself better.
Im working on a event handler in openbravo that creates a structure of folders via rest api, I have been able to make a single folder so I could make the structure via java but i need to add alot of stuff to all the folders idividually so my work will be x100 harder, so Im searching on internet a way of creating from a space template but cant find nothing, would be nice if u could lend me a hand, its my first time using Rest apis too so Im not that good on this, thx for ur time.
Something cool about Alfresco is that if you look at the Alfresco public REST API and you don't see what you are looking for you can simply write your own RESTful end point.
To do that, you use the Web Script Framework (tutorial). With the web script framework you can implement controllers using either server-side JavaScript or Java.
That gives you access to the entire foundational API of Alfresco, which includes the ability to create folders from space templates.
For example, when using Java to create a folder from a space template, you can use the fileFolderService to copy the template folder to a parent folder, like this:
fileFolderService.copy(template, parentFolder, folderName).getNodeRef();
That template variable is a nodeRef. How you get that nodeRef is up to you. One way would be to do a search for it.
So, to re-cap, write a web script. The web script can use the foundational API to create a folder from a template. Your web script can accept arguments for things like where to put the new folder, what space template to use, etc. That's up to you.

Adding Headers to Firefox HTTP Request without Using PlugIns

I have Firefox version 52.1. I cannot udpate to newer version, nor can I add plugins that people ordinarily install to address these issues.
I am calling some rest services that require communicating that these are POST request plus a couple of other things ordinarily communicated through hearder information.
What options do I have for adding these specific header requirements to my Firefox request assuming I cannot add plugins or upgrade to a newer version of the browser? Thank you.
Ok, so simply by opening the very basic developer tools (i.e. press F12), then executing the request (which will fail because it is missing header info), then selecting the network tab in the tool followed by the All within the Network frame, it shows the failure info. Then I can select the default method value (GET) in the table of the attempted request, it will open a frame of the right of the tool. This frame has a header tab whose frame allows you to modify the header by clicking the Edit and Resend button. Click that button and then add the additional needed header params. then click the resend button.
Another option is to use Postman. Especially when you're going to do this on a regular basis. I started out using just the browser like you, but it got pretty cumbersome, so I switched to Postman.
web.postman.co

How do I publish just 1 HTML file in author instance of aem server?

I want to create a simple HTML file
/content/1.html
in the author instance in the aem server and publish it. How should I publish it - either through the UI or command-line is fine?
Two options for easier, to handle from browser itself,
1) Go to tree activation page and select the page path which you want to activate and click on the Activate button use the check boxes ( Only Modified, Only Activated, Ignore Deactivated) according to your need,
2) Go to crx/de console select the page that you want to activate under the content node. use the right side Replication Tab Replicate button to replicate the node.
Note that when using this node level replicate action you need to
activate all the child/individual nodes that are required to your page
content.
There are several other ways of doing replication by code, CURL, etc. as which one to use depends on your comfort levels.
package manager Image
Simplest ways are already mentioned above but i am mentioning one more way .
check it out if you are more comfortable with it.
You can replicate it or publish your file using Package manager.
1.Goto http://localhost:4502/crx/packmgr
2.Goto your package[/content/1.html] and edit it.
3.Save it and choose the replicate option under the more tab.
In the page side kick, you click on properties then "activate"

add functionality layer to AtTask by plug-in on Internet Explorer

I would like to add functionality to the AtTask system by "adding a layer".
What I want to know is whether this can be achieved with a plug-in for Internet Explorer.
To give a concrete example:
This extra layer would allow users to click on "Online Edit" document (which is not available right now). The linked application will open, and when you click save, the file is loaded back to AtTask.
All this happens in the background via the AtTask API, and is transparent to the user.
The question is: is it possible to add functionality to a site by somehow adding layers?
Last comment: this plug-in (or whatever needs to be installed inbto the browser) will only be visible/active when accesing the AtTask website.
Thanks in advance for your responses.
Within the confines of AtTask your best bet is to use an "External Page" create a service that handles the data in the manner you need.
The Dashboard that contains your External Page can be added as a tab via Layout Templates.
Most of the heavy lifting would have to be handled by your application. You would have to link the document(s) you wish to edit.
Some sort of referrer would be necessary to place the revised document back into AtTask. The method in which the client can do this would be determined by your preference and requirements. I am sure you can find some sort of Wiz-Bang jQuery uploader.
Depending on the level of control you have with your user base, you could make an Application URL
Windows : Registering an Application to a URI Scheme
OS X : Launching Scripts from Webpage Links
I do not know of any other way to handle this other than what Steve suggested.
Having said that a possible solution to this is to create a new application and iframe in AtTask.
At the top or wherever on the page your application could have a link for "Online Edit". Then you would use javascript to extract the task id, project id or any other needed information you need for the api to get the needed content to edit. Then save using the same api information.
I have not tried this type of method but theoretically it could work.