IHateSpaghetti {code}

VSX, DSL and Beyond by Eyal Lantzman

Syndication

Coding / Architecture

Extensibility /DSL

Projects

Articles

Browse by Tags

All Tags » Testing (RSS)
GDI vs GDI+ text rendering and measuring
I was investigate a GDI/GDI+ related bug the other day and I found out that GDI+ doesn’t render RTL text very well. In order to render it correctly you need to render it using GDI. GDI+ Text rendering This is done by Graphics.DrawString(…) / Graphics.MeasureString(..) GDI Text rendering This is done by TextRenderer.DrawText(..) / TextRenderer.MeasureText(…) The interesting thing about GDI text measuring is that it sometimes the measured size might be larger than the maximum size so be aware of that...

Posted by Eyal | with no comments

Handling Corrupted State Exceptions is not supported by default by CLR 4.0
In the February MSDN Magazine there's a very interesting article about CSE and what is changed in CLR 4.0. It seems that the code below would wrap corrupted state exceptions thrown by the OS (such as Access Violation) and thus leaving the application non stable state when you not fixing the CSE. 1: public void SomeFunction() 2: { 3: try 4: { 5: //Do something 6: } 7: catch (Exception ex) 8: { 9: throw WrapException(ex); 10: } 11: } So they CLR guys made some changes and thus no more CSE exception...

Posted by Eyal | 2 comment(s)

Distributed Coded UI Tests
Mathew explains how to leverages the existing Load Test architecture in order to run Coded UI Tests in a distributed fashion. Read more

Posted by Eyal | with no comments

WPF unit testing propblem and solution
When testing WPF forms on WinForms hosting WPF controls you'll probably get test run error: One of the background threads threw exception: System.Runtime.InteropServices.InvalidComObjectException: COM object that has been separated from its underlying RCW cannot be used. Here is a quick sample of code that causes this problem: class MyDialog { public bool Show() { System.Windows. Window w = new System.Windows. Window (); w.Show(); } } And here's the unit test using System.Windows.Threading;...

Posted by Eyal | with no comments

Blog Carnival #8
Unit testing Udi Dahan wrote a post about unit testing - Unit Testing for Developers and Managers Architecture Carnival of Enterprise Architecture #12 Architecture as diagrams is an anti-pattern! by Alan Inglis Modeling UML and DSLs by Steve Cook Deployment Web Platform Installer: Trying to make it easier to setup for web development by Scott Hanselman Security Preventing third-party derivation, part two by Eric Lippert That's it for now

Posted by Eyal | 2 comment(s)

Blog Carnival #6
In this carnival there're a lot of software design/patterns and frameworks a bit of SOA, UML, DSL and NDepend and . . . V I S U A L S T U D I O 2 0 1 0 !!! UML Rejoining the OMG – UML and beyond - by Steve Cook Visual Studio 2010 Visual Studio 2010 and .NET 4.0 Overview Videos on channel9 ALL WEEK !!! DSL How do I create a ModelElement via API by Pablo Galiano F# and functional programming Object Oriented F# - Creating Classes by Matthew Podwysocki Software design ,Design Patterns and Frameworks...

Posted by Eyal | with no comments

.Net Deadlock Detector - cool tool for your toolkit
I found a great tool that detects deadlocks using debugging tools for windows very interesting approach! The tool does not require to have the code re-compiled in any way or form, with any external dependencies, nor reference any external library or have you modify your code to use any special type of locks inside your code It works on release builds with no PDB files It works on running processes or previously captured memory dumps It detects deadlocks across multiple threads and returns detailed...

Posted by Eyal | with no comments

Pex - Automated Exploratory Testing for .NET
Microsoft Research are working on a tool called Pex , which is essentially unit test generation helper tool. Pex generates Unit Tests from hand-written Parameterized Unit Tests through Automated Exploratory Testing based on Dynamic Symbolic Execution . • Unit Tests: parameterless methods that test a single unit of code • Parameterized Unit Tests: same as above, but with parameters • Automated Exploratory Testing: A tool-supported process of running, learning and testing code at the same time • Dynamic...

Posted by Eyal | 2 comment(s)

תגים:

PUnit – Parallel unit testing in making
Unit testing nowadays focuses on simple units that (hopefully), when tested together, will make your code (if done thoroughly) more robust, clean and basically better. How every all of this doesn't guaranteed in multi thread environment. Locks, unsynchronized behavior, and general unexplained behavior is common when dealing with multi threaded environment. Specially since PLinq and the multiple core availability those problems will acute further. So I though of a testing framework that will enable...

Posted by Eyal | 7 comment(s)