.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Unit testing with autocad

5 REPLIES 5
Reply
Message 1 of 6
Anonymous
1662 Views, 5 Replies

Unit testing with autocad

Hi,

how can i make unit test(with nunit, or other unit test framework)
with autocad? Is it possible?
5 REPLIES 5
Message 2 of 6
Anonymous
in reply to: Anonymous

This message was cancelled from within Mozilla.
Message 3 of 6
Anonymous
in reply to: Anonymous

I'm searching for more resources on this also.... Time prohibits me from trying stuff out myself, but I have found some directions:


As I have posted on Keans blog: [http://through-the-interface.typepad.com/through_the_interface/2008/11/adding-a-custom.html?cid=143409992#comments|link]

A tool exists, Gallio that (among many other features) runs MbUnit tests in the AutoCAD context.
I have not yet had the time to look into it, but it seems interesting. The documentation on AutoCAD integration is scarce though, so trying it out is the only way to go right now.

Another option, from my point of view, 'Contracting' all your functionality. This means writing interfaces for the self-written functionality, and mocking it in the unit tests.

This way you don't need to use the acad dll's, but it does create a LOT of overhead for your code. It means proxying all acad-functionality you need, again in your own code.

If anyone has any other options (or links), please share... Edited by: bertvan on Dec 24, 2008 10:38 AM
Message 4 of 6
Anonymous
in reply to: Anonymous

Hi,

I've played with Gallio some more, and the Unit testing inside the AutoCAD process works great.
The major pitfall of working this way is in my opinion the lack of possibility of combining NCover with the Unit tests...

I'v posted a question concerning this on their google group: http://groups.google.com/group/gallio-dev/browse_thread/thread/509366641eca5f0?hl=en

It seems this functionality won't be around soon...

I do remember playing around with the unit testing in Visual studio, and there it did work if I set the path correctly. The downfall here is that for every test session, Visual Studio copied all the needed dll's (about the entire installation dir) for every test. Which was pretty lengthy...

So, any extra light (from Autodesk 😉 would be welcome, because for now it seems as I'm just talking to myself 🙂
Message 5 of 6
Anonymous
in reply to: Anonymous

Hey, I'd love to hear updates...I for one am getting started trying to use Gallio with AutoCAD. I appreciate the posts.
Message 6 of 6
Anonymous
in reply to: Anonymous

Hi,

I have succesfully implemented this at the moment. However not with using Galllio, but by using IoC (Windsor, but you could also use home-written factories).

Gallio seemed too cumbersome, and did not allow us to extend this with Coverage etc.I wanted fast execution of the tests.

So we created some sort of extra framework, wich can be mocked, and we can unit test against that without any problems.

To perform unit tests on the code that actually calls the acad API, you will need something like Gallio. In the future we still might test the lowest level code of our framework with Gallio.

--

http://cupocadnet.blogspot.com

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost