I have created below simple testcase in Delphi Prism. When I run the testcase using Gallio Icarus, it returns a This test is not supported by any available test framework.
I can think of only two reasons why this might be happening
- I am missing something (really) obvious. A setting, a missing initialization somewhere, ...
- It is not possible to use the MbUnit - Gallio combination with Delphi Prism.
I do 开发者_如何学Chope it is because I am missing something obvious. In case it isn't, what do other people use as testframework using Delphi Prism?
namespace MailExtensionTests;
interface
uses
MbUnit.Framework;
type
Class1 = public class
public
[Test]
procedure TestSomething;
end;
implementation
procedure Class1.TestSomething;
begin
Assert.IsTrue(True);
end;
end.
I am not well versed in the .Net landscape of things, at least I've learned that much.
I know now that I had given way to little information about what versions I used to be able to answer the question.
- Windows XP 5.1.2600.
- VMWware 6.5.4 with 2Gb of memory.
- Delphi Prism running in Visual studio 2010.
- .Net Framework 4
- Gallio 3.1
- MbUnit 3.1
Now that I have been able to solve the problem created by yours truly, these are two solutions that worked for me.
First solution
One thing I neglected to mention whas the .Net framework I was compiling against.
Our aim should always be to go for the higest, the fastest, the bleeding edge kind of thing right? As such, it was a no-brainer for me to choose .Net Framework 4 as my Target Framework to compile against. I mean, the highest, the best, the meanest... What could possibly be wrong with that.
Well for starters, Gallio version 3.1 doesn't support .Net Framework 4. It would have taken me a mere look at the home page of MbUnit to figure that one out. But who reads that stuff anyway, right? Surely, not some hardcore developers like myself. You never know who might be looking over your shoulder, catches you reading documentation and your reputation goes right down the drain.
After I finally made peace with myself there was no way arround it than actually trying to read some documentation, I was able to compile a version that ran in Gallio 3.1. Hooray, mission accomplished... or so I thought.
Running that one, really simple testcase took about half a minute, every time, all the time. That surely couldn't be right?! Luckily, this problem was already mentioned here and here what brings us to
Final Solution
As been mentioned in the slow Gallio posts, one way to solve them was to install the latest, unofficial, version of Gallio. Talk about bleeding edge, this is it. I felt my heart pounding in my chest, adrenaline pumped up and it took me some serious constraint not to shout it out.
A link to all latest versions of Gallio, one download, one install and some reattaching of references was all it took. I was finally able to run my testcase not only in .Net framework 3.5 but also in .Net framework 4.0.
Oh yeah, eat that baby. Who's the man now... who's the man (relax Lieven, breath... breath...)
Final thoughts
It has been an interesting journey for me to say the least. I have regained some of my lost humility.
Those of you who haven't dozed of to sleep by now, you have my respect.
精彩评论