Environment

Continuous Integration – Test Environment

September 4, 2010 CI, Environment, UnitTesting 6 comments

Couple of days ago I’ve been on CI seminar, where guy had been talking about concepts of the Continuous Integration and at some moment mentioned about testing environment and it suddenly dawned upon me and I would like to share my thoughts on this.

Two of many concepts of the CI are:

  • Have repository with all needed to build product on the virgin machine using command line.
  • Unit Tests, Integration Tests and Deployment should run on environment similar to production.

Feel the difference?

Ok, why do I ask about this?
Maybe a week ago we’ve moved to approach that builds sources and runs unit tests on absolutely virgin machine. Simply saying, nothing is installed into GAC, except of maybe .net framework. Everything needed we take from library folders under source control. And I agree that is really good thing. Compiler is also ok to build projects when they have reference only to root assembly in folder of other assemblies of some particular component. BUT, when you execute your code (run tests) CRL tries to find assemblies in execution folder and then in GAC. Since we have nothing in GAC, we should ensure that everything gets copied to execution folder, and here we dive into issues.

Fixes

In case of simple referencing this is not a big issue. You just should be as a spider and catch what is missed on enigma CI build machine. In some cases this is very trivial – you see System.IO.FileNotFoundException, in other cases it is not obvious.

Interesting trick

Here is one of tricts that we were needed to apply to make UT happy:
Since dll-s like sqlceme.dll are part of SQL CE, but are not CLR dlls  we cannot reference them. So we add them as link in your project and then change Build property to “Copy Always” to have them in bin.

There were some other tricks we were needed to try. They are simple, but there are many.

Main Question is still remaining

All that is not main intent of this post. Main is this: Do I really need to do this. Why is this correct?

And if we are so dedicated to CI, then I would like to know also what are we testing? That our code is able to run even if none of 3rd party components are installed?

I still have some doubts, maybe I’m wrong. I would really appreciate any of your thoughts, comments that will help me figure it out and find the right way.

For fun (but maybe will get lucky) I also asked Martin Fowler in twitter:


6 comments


Simple Web Page doesn’t work after Ctrl+F5 hit in VS under Windows 7

March 14, 2010 ASP.NET, Environment, QuickTip No comments

I’ve upgraded my system to Windows 7 couple of months ago, but I haven’t used web development.

The Problem
Few days ago, I created empty web application, added new page and added <p>bla-bla<p>, then I hit Ctrl+F5 and my default browser opened, but nothing happened. I was thinking that it is because of my browser, so I switched over 3 browsers and nothing helped, I also thought that it VS2010 broke something causing asp.net development server issues, so uninstalled it and installed back, but nothing helped.

I even had a thought to reinstall system, but decided to search over the internet more deeper and found that:

Reason
Reason is that when system uses IPv6 browsers could have issues with resolving localhost. 

Solution
Disabling IPv6 is solution for this problem.

You can disable IP 6 in your system by ensuring that you have this in your registry:
HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTcpip6ParametersDisabledComponents set to 0xffffffff

Firefox settings change
Also when searching I found for myself that we can change settings of Firefox with writing about:config in address bar.


No comments