Can Coded UI Tests Be Used with External Sites? - single-sign-on

I'm trying to figure out a way to automate testing for Single Sign On (SSO).
For us the process is as follows:
The user logs onto https://www.identityprovider.com
They click a link that takes them to our authentication server (the application that we are testing).
They are automatically logged into one of our web application (www.serviceprovider.com).
Writing useful unit tests for this seems to be difficult because of the protocols used for SSO (SAML, OAuth), and so I thought that a good way to do the testing would be via recorded step testing through something like MS Coded UI tests or Selenium. We would prefer to go with MS Coded UI tests because of the integration with the VS solution.
That said, can anyone tell me if I can start my CodedUI test from an external website (for example: google.com), or am I limited to my local solution?

You are able to hand code that.
BrowserWindow bw = BrowserWindow.Launch(new System.Uri("http://google.com""));

Related

A/B Test a Page Step in a Single Page without a new URL

I am trying to figure out how to run an A/B Test for a change on a Page Step for a Single Page. The idea is we have a payment flow with several page steps each containing a form. We'd like to swap out forms and test how our users react. We are trying to avoid changing the URL.
I looked into tools such as Google Analytics, but that requires a different URL to run the A/B test. The hesitation about creating a new URL is because our users are known to bookmark them, and we don't want to keep a backlog of redirects from invalid URLs, also we'd like to avoid constantly deploying new URLs for our tests.
I cannot seem to find any tool to do this, so I've tried to think of a few solutions but I'm not having a lot of luck.
My best idea is to build both a and b forms into the page, and when a user accesses the flow, the session randomly(based on a preset%) stores a value that dictates whether the user is in test a or b. Then when they step into that form, the server will serve the proper form to them. If they abandon their session, we'd track that, and if they complete the action, we'd track that.
I feel like there should be a better solution, but I just cannot come up with one.
My results online were either blogs showing how to approach it from a high level, and all of them used different URLs, I have found almost no developer resources.
Thanks.
We're using ExtJS 4.2.2, and .NET as our server.
Whenever you need the server to be involved, you need server-side instrumentation. No free tools offer that, but you could consider Optimizely "full-stack" (has support for C#) or Variant (does not yet).

Can I use protractor not only for testing but for filling a form automatically, if not what can I do?

A friend of mine has to fill online forms every day, and she wonders if there is a way to make this things automatically because she has all the data in a separate file. I showed her protractor, so she asked me if it is possible to use protractor for filling these forms. I think that one is able to use protractor when owns the project, but I don't really know if it is possible to use it when not. If it is not possible to do it, what can I do. I mean what she can do.
In some cases you could, but mostly no. Protractor only appears to work with websites built using AngularJS, however the website does not need to be served locally. The example on the Protractor homepage performs a test on the public/offical AngularJS website:
browser.get('http://www.angularjs.org');
From your own home computer, you can run automated Protractor/Jasmine tests (or other such things) on public websites built with AngularJS. However, you won't be able to perform a Google Search with this method for example, since http://www.google.com does not use Angular.
For more versatile browser automation, you could look at Greasemonkey for Firefox, or Tampermonkey for Chrome. These allow you to write JavaScript which will run in your browser, on top of a particular website, to modify that website's appearance or behaviour.
One other possibility is to write some kind of full automation script, using Python or BASH/curl. Deconstruct the web forms, treat the website effectively like an API, and use HTTP POST to submit form content. However, this would only be effective if your friend uses a select few web forms since it would need to be heavily custom-designed for each form. Also, it would not allow her to manually interact with the website or enter any values. That said, it is probably the most universal and commonly used method of achieving the automation you speak of. Additionally, the website(s) your friend uses might even publish some kind of official documented API, which would make this process far easier.

Is it possible to inject test cases into soapui at runtime with test runner?

I am trying to determine whether I am able to inject test case information at run time and leverage the SOAPUI tool. I understand that I can create test cases on the GUI but is this my only option?
Background info if interested: Currently I am working on creating an automation framework at my company. We currently have web page testing and soon to be added SOAP testing. As many of these tests (at one point in the future as I am told my the architect) could be run from both a web page and soap I think it's best to store the test cases in some format (Json, YAML, etc.) to document all the test cases and then inject them into test steps at run time.
However my company enjoys working with SOAPUI. I've used the tool and created test cases, assertions, et al on the GUI (of course) but I cannot find any documentation which suggests that instead of defining the test cases in this way I could inject the test information at run time (similar to what you can do with the wsdl2java apache tool). Can this be done with testrunner? This way I can reuse the test cases. Is this possible? Does this even make sense? I just want to attempt to incorporate a tool I've been asked to use.
Any thoughts are greatly appreciated!
Here is an example of what data may look like:
Partner : [
Organization : [
Company Name:
Company URL:
]
Contact Information : [
Name:
Address:
]
] (sorry i can't get the indents to work properly...)
As I stated below in a comment, I know on the SoapUI GUI I can create a test suite, test case and add test steps. But I want to store the test step information in a different place so I can use the test steps for different kinds of tests.
Your question is way too broad for me to even attempt a complete answer.
SoapUI GUI you use to create the tests. Your data can be stored, and read by SoapUI, in Excel, database, flat file, generated dynamically, whatever you want. You can run everything using the testrunner from command line, or using the Maven plugin from Jenkins.
Seriously, spend some time with the documentation.

Testing Google Analytics iOS SDK

Has anyone found a good way to test Google Analytics on iOS? The SDK is really simple but the docs do not discuss how to test or validate.
Does the library behave differently on the simulator or when running a debug build config?
I setup a delegate GANTrackerDelegate with this delegate method:
- (void)trackerDispatchDidComplete:(GANTracker *)tracker
eventsDispatched:(NSUInteger)eventsDispatched
eventsFailedDispatch:(NSUInteger)eventsFailedDispatch;
That method gets called just fine and I see positive values in eventsDispatched and eventsFailedDispatch has always been 0. Beyond that is there a way I can test that those events are being received correctly and correlate with what I think I'm submitting?
I'm thinking I need to setup a dedicated GA Website profile for test. Run a fixed set of UI automation unit tests and then wait 24 hours for that data to be available and validate "by hand". Ick.
Now it's a lot easier with realtime analytics, you see the visit in realtime, and it's working on the simulator :
https://www.google.com/analytics/web/#realtime
Why not just test the lib separately? Write a simple class and make as many calls as you want. This won't involve any UI automation so should be easy to implement.
Mobile Analytics: An End-to-End Walkthrough has a section "Finding Data in the Analytics Web Interface" that says,
Bear in mind that it can take the analytics front-end up to 24 hours to process newly collected data.
So it looks like setting up a dedicated GA Website profile for test and performing scripted UI tests is probably your best bet.

VB app to web service

I know very little about web service but I assumed it would be the solution I was looking for. Basically I made an application in VB that I want to be ubiquitous for a lack of a better word. I need it to receive requests from multiple users and respond all at once. I was told "technically if you write a webservice you can provide as many results back to users as are connected."
Maybe there is another solution for me that will give me the results I want.
Here is an example of what I'm trying to do.
Lets say I make an application in VB that does math.
I now make a website. My website allows for a person to input 1 + 1
they click submit and my website then connects to my VB application running on my server
listening for a request. It accepts the request from my website, and then it solves the math problem and returns the answer back to the website "1 + 1 = 2"
That is only an example of the type of thing I need. My problem is that I can't have multiple people visiting my website all connecting to that same application running on my server so somehow I need the application to be where it can be accessed by multiple users. I was told a web service would be the answer but if there is another solution I'd like to know.
If the only solution is a web service, then how can I manage to either convert the VB app to a web service? Can I have to convert the app to asp.net or some other language? Is there an easier option?
Without knowing more about what you're actually doing, I might suggest that building an ASP.NET project around your existing VB code might be a good approach. It's going to be awkward to build any kind of "web service" around an existing (presumably GUI) application, so rebuilding your code inside ASP.NET would be the way to go.
How about doing it the push notification way.
http://channel9.msdn.com/posts/Windows-Phone-7-Push-Notification-QuickApp--Web-Service-With-Azure-Publishing-Instructions
You can inform users of your application via a push notification