Test Configuration Parameter - Tosca - tosca

My Tosca test case folder will have 5 test cases each with
Test case from Library - Open URL
Functionality checks
This URL may change but the functionalities are the same.
Is there any way to keep this URL as variable so that I can run the functionalities in any URL I input?
The URL should be generalized for the Test case folder

You can create library with open url module and create business parameter for url. This way you can easily change url every time

Related

Demandware - Pipeline not found for current domain

I already made pipeline. Which is working fine. Suddenly it give error like
2015-12-18 02:39:08.091 GMT] ERROR system.core ISH-CORE-2368 Sites-SiteGenesis-Site core Storefront [uuid] [request-id]-0-00 [timestamp] "Error executing pipeline: Hello com.demandware.beehive.core.capi.pipeline.PipelineExecutionException:Pipeline not found (Hello) for current domain (Sites-SiteGenesis-Site)"
Does anybody know how to solve this?
In the event that your pipeline can not be found for the selected domain, please go trough and verify all of the following:
Double check Pipeline-Node naming
Pipeline URLs are generated by their name and your desired entry node, in this scenario, I would expect a file named Hello.xml in you cartridge's pipeline directory, and a start node named Start, would be accessed via {instanceURL}/on/demandware.store/Sites-mySite-Site/Hello-Start
Try and force upload of your cartridges
Occasionally the files on the server will not be updated correctly when a save is made; to force an update, right click your project, click Demandware > Upload Cartridges
Check your Cartridge Path
If you are using a shared instance, or your instance is re-provisioned, you may need to check your cartridge path to be sure your custom cartridge(s) are still there.
Check your Code Versions
Occasionally you may increment / change your code version - if you do, make sure that the path you select in Studio is the one that you have selected in Business Manager.
Tech Support
Should you still have issues following the four steps above, please file a support ticket and the tech-support team will be able to provide you with more assistance.

Running several sites off the same code except a config

I have the same code which will be used for several sites. In the Nginx config I wanted to have all the sites point to the same code folder.
I think this should work. The only catch is that I want each site to use a different config file.
How could something like this be achieved? Surely I wouldn't need to duplicate all the websites code just to have each one have a different config?
What language are you scripting in? Most languages will have a way to examine the incoming request. From this you could extract the domain name from the request and base which conf file you load based on the name using an if or switch statement.
You could also use a get variable for example www.domain.com/index.html?conf=conf1.conf. Then in your controller you'd need to look at that git variable to determine which conf file to load.
Either of these solutions should be easy to find in the docs for you scripting language.

How to MapPath in an IIS7 Rewrite Provider?

I am using the rather excellent IIS7 Rewrite module (V2), and want to create a custom RewriteProvider that rewrites differently depeneding on whether the physical file exists.
I have successfully created a provider, as in this tutorial:
http://learn.iis.net/page.aspx/804/developing-a-custom-rewrite-provider-for-url-rewrite-module/
However, really need to be able to map the url to a physical path - I would normally do this via HttpContext.Current.Server.MapPath() or HostingEnvironment.MapPath(), but it looks like the HttpContext has not been initialised (at least within the current App Domain - since the ReWrite module is native code, I'm having difficulty working out where I can get this information).
I don't really want to have to resort to creating my own rewrite module to get around this problem - anyone have any clues for me?
Thanks!
Mark.
You will not be able to get to it using those APIs since the code runs in a different AppDomain than the one ASP.NET is using.
The only way I can think to make this work is to pass the right Server Variable that includes the physical path to your extension and do a Path.Combine() yourself.
So assuming you have an extension called YourProvider that you are calling somehow like this:
{YourProvder:{URL}}
You can do:
{YourProvder:{APPL_PHYSICAL_PATH}|{URL}}
You can now get the physical path and the URL separated by a pipe | , make sure to pass the Physical Path first since the URL is in the control of external users you do not want them to trick you into getting a different physical path.

How can I configure my data services in Flex to call the same domain that the SWF was served from?

I've got an HTTP service I defined in Flash Builder, via the "Data Services" tab. I've got an absolute URL in there right now.
What I really want is to not define a path that includes a domain name at all--I want the service to simply call an absolute path that's on the same domain as whatever domain the SWF was served from... can I do that? When I got rid of the base URL and then gave an absolute URL path (e.g., /roster/deleteMember), Flex Builder complained that "File does not exist." Well, of course it doesn't exist, it isn't a file, it's a URL to a service call--there is no corresponding file on the filesystem.
Can anyone advise me how to do that? If I change the domain name, it wipes out all the parameter definitions for the methods, so I have to go back to each method and setup the parameters again. Rather a headache.
Now, I would have thought this would work. from the adobe documentation:
The configuration files sometimes contain special {server.name} and {server.port} tokens. These tokens are replaced with server name and port values based on the URL from which the SWF file is served when it is accessed through a web browser from a web server. Similarly, a special {context.root} token is replaced with the actual context root of a web application.
So, if you specify the endpoint as
http://{server.name}:{server.port}/{context.root}, then
automatically on runtime, the variables are set by the flashplayer depending on where you've been downloaded the application.
Sounds great... but it's not working for me. I can't even set those values in the Flash Builder Data Services tool. Here's a recording of what I'm getting.
http://screencast.com/t/MTk0NzNiYzY
I'm not sure it's possible from the DS window.
If you were doing it in code, you could use Application.application.url to get where the swf had been loaded from.

Getting web address for local file in ASP.Net

Is there a 'correct' way to get the proper web address for a file under an ASP.Net application? For example, I have content in '/Content/Images/Gallery/2010-01-17/small/', and I would like to iterate through all of those files, and output to the browser a link.
Now, I can do it manually by working out the path from the files FullName or I can do it from knowing the current directory, but is there a proper ASP.Net way to do it?
As you can probably tell, I'd rather use the provided method if it exists :)
Regards
Moo
You can use the method ResolveUrl() for that. If your content directory is located directly under you web app's root directory, then this should work:
// "~" results in an URL to your web app's root directory
string imageBaseUrl = this.ResolveUrl("~/content/gallery/2010-01-17/small");
Then you can append the names of the images to that base URL.
I think ResolveUrl is only part of the answer.
Unfortunately, there is not a built-in function to return a full URL to a particular resource, inclusive of hostname and protocol. Part of the reason for this is that you can access a URL any number of ways... and the server is completely agnostic of the hostname. You have to look at either the Request.Url properties to build a new URL from the user's request, or use ServerVariables.
See this question:
How to Convert "~/default.aspx" to "http://www.website.com/default.aspx" C#?

Resources