Category Archives: Testing

How to convince Internet Explorer to show more pages with untrusted cerificates in one tab (iframed)

Funny article name you say and I can only agree, yes :) most of the time you run like hell when you see page with broken certificate. But I will explain why one might need this :)

My girlfriend is a tester and at her current work she is testing web apps. Since majority of these apps use SSL and she is using staging versions, she has to accept certificate errors and if you know what you are doing, than everything is OK and fine (you see errors because of self signed certificates).

Yes there are more ways how to get over this problem :

but if you don’t want to do this/you cant do this on your box then you just have to live with basic temporary exception and you will click Continue to this website :

ie certificate error

And now comes the problem part/our edge case. Most of the time you are accessing one URL on one server and everything works.

But lets say you have your testing URL with self signed certificate where is a page with IFRAME to different URL with different certificate on different server. Now what? You have to add two different exceptions.

The problem lies in how IE (tested in IE11) displays another page. You just don’t have any option how to add another exception, you just see that the iframed page has invalid certificate, nothing more…

The FireFox solution :

The FireFox way is more common and most of people know it (so just small recap):

you can open new tab with IFRAMEd URL, access it, see error and add permission. Than on another tab access hosting page, add second exception and you are done, all of the later visits to hosting page share the same exception. Which is nice, because you can close the tab and open different one later and you don’t need to add exception to IFRAMEd URL over and over again.

The IE (I suppose because of the architecture – more on this here – ) behaves little bit differently.

The IE solution :

In IE the exception for IFRAMEd page isn’t shared between tabs/shared for whole browser instance so you have to :

  1. Access the IFRAMED URL and add exception and then on the very same tab
  2. Access the hoster URL and add second exception

and everything should work now also for IE the way expected :) but once you close the tab with exceptions, you have to do the same thing again…

Decision which way is better/safer is up to you….

Hope this helps :) Tested on latest versions of Windows 7 + IE11.

No tests were run because all loaded or selected tests are disabled problem in VS 2010

I want to share with you one really nice pitfall I faced at work and that is this nice note once you want to run unit tests inside VS 2010 saying :

No tests were run because all loaded or selected tests are disabled once you try to load and run some of them.

vs2010 unit tests problem

Hmmm, now what? Hitting CTRL + SHIFT + B will build whole .sln and there is no compile time error (but under my conditions, please read whole article if you want to know more).

In general the reason is : In your test solution is some kind of problem, possibly build problem and VS can’t load it and run tests, there is nothing to load when you cant build it. The reason why you can’t build it may vary.

But hey, you just build the whole damn thing and there was no trace of error in console window. Well, in my case two things met.

  • In our particular solution, we are using WCF service + project that references it and this WCF service reference is used later in another project that connects to the service (everything in one solution),
  • Some colleague of mine just unchecked building of Service part unit test and because we have only WCF reference between Service and its consumer (not in References of project),  then Test project of service isn’t really built.

Then we can have nice error in our .cs test file + whole .sln built at same time like this:

vs 2010 tests error

Nice, isn’t it? :)

For better explanation of common architecture here is small UML diagram (hope it’s correct) :

small soa diagram

We can have some functionality in class libraries (multiple ones) + unit tests regarding their functionality. Then we expose this functionality as service via WCF service.

Chain in which .csprojs are referenced is following : class libraries on service side and then WCF service it self.

Then we have WCF Reference library + things that depends on it like in this picture Web app, or any other app that will use it. Because it makes sense to mark Web app as starting project, if we uncheck building of test project,VS 2010 doesn’t see any reason to build them. They aren’t in chain, nothing really depends on them. At least from VS’s point of view.

In my test proj solution properties what to build can look like this :

test wcf project solution properties

OK, so now you know what happened in my particular case, hopefully this will help some of you to troubleshoot your particular problems. There is high chance, that problem will be very similar.

Small project I used to play with can be found here :!1830&parid=78A5783DE37D2EBE!1782