Saturday 15 January 2011

Creating project code coverage with PartCover and NUnit

Since my last posts ‘Integrating PartCover with Visual Studio 2005’ and ‘Integrating PartCover with Visual Studio 2008’ a lot of things changed and improved. PartCover project got itself a new home and now targeting .Net 4.0 Framework. NUnit testing framework also made a lot of improvements. In this post I am going to show how to run code coverage for a test project with NUnit console runner and PartCover browser. I will base it on my EnvMan project.

Getting PartCover and Nunit to run

First of all you need to download and install PartCover from Github project server. After installation you will find PartCover browser manual and PartCover console manual, which are very useful for understanding of rules creation and PartCover parameters.
Start PartCover Browser.
image
Select File>Run Target. It will open ‘Run Target Settings Window’
image
Click Browse buttons to select nunit-console.exe  and working directory for running NUnit. Working arguments should have “/noshadow” and a full path with the test project name or NUnit project name. “/noshadow” will make NUnit not to create shadow copies of the files and will allow PartCover to load source files in the browser. In EnvMan project I have NUnit project file which has two assemblies in it. In the rules window enter
+[*EnvMan*]*
which means (+) add rule where include any assembly which has EnvMan in its name and any namespace in these assemblies. After this you can click start to run tests. Don’t forget to save xml configuration file for future use.

Inspecting code coverage

Congratulations! You can now inspect the results by using Views>View Coverage Details.
image

Monday 10 January 2011

Free Internet Resources for Joomla! Template Developers

I was working on design of the custom Joomla! template and came across several excellent Internet resources I will list below.

Internet Resources

Books

Joomla! 1.5 Template Design by Tessa Blakeley Silver (ISBN 978-1-84719-716-0)

Monday 3 January 2011

Free Candle in the dark Icons for Download

Another free icons of the candle in the dark with bonus free New Year Postcard.

Candle Icon 256x256

Please visit “Recent Work” pages on SETCHIN Freelance Consulting site. Enjoy!

Free Coffee Cup Icons for Download

I recently published different size PNG and ICO icons of the Coffee Cup image I created in Inkscape.

CoffeeCup

Please visit “Recent Work” pages on SETCHIN Freelance Consulting site. Enjoy!

Sunday 2 January 2011

Create icon with Inkscape and IcoFX

Inkscape and IcoFX are two open source and freeware graphical programs. Inkscape is a powerful vector based program, similar to Adobe InDesign or Corel Draw. It can be used to create an image. IcoFX does work of importing these images created with Inkscape and saving them as ICO files. In this post I will show how to create ICO files of different sizes based on the image below I created in Inkscape.

CoffeeCup

Step 1: Create a 64x64 Inkscape document

Open SVG source file of the image in Inkscape. Select the whole image you want to make an ICO from and group all selected objects of the image with (Ctrl+G). Copy grouped image and create a new Inkscape document from File menu. For this example I selected File>New>icon_48x48. Paste copied image into new Inkscape Window. With my image I had to zoom out and resize copied object to fit icon size page. Make sure you lock the width and height to make scaling of the image same. Also it is handy to use Align and Distribute tool to set object in the centre of the icon. In the result you should get something like shown below.

image

Step 2: Export Inkscape Icon into PNG file.

Now we can save our icon as PNG image. Select File>Export Bitmap (Shift+Ctrl+E). In the Export Bitmap dialog click Export area Page, Bitmap size change to 64x64 pixels for width and height. Give it a name and the path where to save a file. Click Export.

image

Step 3: Create ICO file with IcoFx

Start IcoFX and Open our icon in PNG file. Make sure you tick 48x48 size of the image in the New Image dialog as shown below.

image

The image will be imported and we will be able to save it as in icon. Click File>Save As and save it as an ICO.

image

Finish

Congratulations! We created our icon with the two powerful programs Inkscape and IcoFX.

image

To practice a bit more, try creating icons of different sizes. Enjoy!

References

image An Open Source vector graphics editor, with capabilities similar to Illustrator, CorelDraw, or Xara X, using the W3C standard Scalable Vector Graphics (SVG) file format.
image IcoFX is an award winning freeware icon editor. It is an all-in-one solution for icon creation, extraction and editing.
Joomla Web Designer Create your own custom Joomla favicon using Inkscape
Inkscape Tutorials Creating a Coffee Cup with Inkscape