0

Is there unit test frameworks available for MapBasic? I've been searching, but have not found anything.

  • 1
    Not that I am aware of, but just a comment based on your recent questions: It's important to remember that to many, MapBasic is not a true programming language. Its principle goal is to customise and automate MI Pro. The fact that many clever people have created stand alone applications is amazing, considering the limitations you're hitting on. In a nutshell, you're trying to take a 1987 Yamaha Jog 50cc Scooter and compete in the MotoGP. The scooter is great BTW, and very handy, but perhaps not always fit for purpose. – Morgan Ellingham Feb 3 '14 at 0:07
  • @MorganEllingham I agree that it would make very little sense to write any kind of standalone application in MapBasic. There is a team at the place I'm currently doing work for, which maintains a about 100k lines of code MapInfo/MapBasic application. Without unittests. That is amazing to me. And it's far beyond a little automation of MapInfo. :) – steenhulthin Feb 25 '14 at 17:14
  • ouch! I'm a massive fan of MapBasic, in fact its something I really enjoy working with - when its fit for purpose. Troubleshooting and testing it is an art and something which takes intimate experience to get good at, but, it is possible, you just have to create your own methodology. If you are committed to keeping it that is. – Morgan Ellingham Feb 26 '14 at 0:16
0

In my past MapBasic days I did write unit test in MapBasic - without any framework. But creating my own test methods, comparing expected values with hard coded correct value did help me a lot, when I made updates and changes to my code.

1

I have now written a quite crude library for unit testing MapBasic code.

It's called MapBasicUnit

http://steenhulthin.github.io/MapBasicUnit/

  • Well done!!! Might try it out later. Oh and it would be a really good idea to post this to the MapInfo-L google group. There are probably 20x the MapInfo users there than there are here. I know quite a few would appreciate this. – Morgan Ellingham Feb 26 '14 at 23:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.