COMMUNITY

Poll - Unit Test Frameworks for haxe


(Laurent Deketelaere) #1

Which framework are you using in your daily work?

  • haxe.unit.*
  • munit
  • utest
  • hunit
  • tink_unittest
  • hexUnit
  • My own solution
  • None, I don’t see any advantage spend time on testing
  • None, I see advantage, but I’m a lazy developer

0 voters

I’m very curious to know which solution is used by Haxe developers to unit testing them code. Do not hesitate to add some details about your preference. :slight_smile:

// Because I cannot edit poll, I will update this extra entires from comments:

  • Buddy +5

(Leo Bergman) #2

Buddy. Like the bdd style syntax and it is familiar to js developers used to mocha, and works well across targets.


(Valentin Lemière) #3

For information haxe.unit is removed from the std in haxe 4 (available in https://lib.haxe.org/p/hx3compat/).


#4

+1 for Buddy


(Laurent Deketelaere) #5

To bad, I cannot add Buddy, only moderator can edited poll.


(Uldis Baurovskis) #6

I use munit now, but thinking to move to Buddy as I am more used bdd style


(Andy Li) #7

I’ve just tried to edit it for you, but got You cannot add or remove poll options after the first 5 minutes. You should close this topic and create a new one instead.

Back to the topic. I actually quite enjoy using haxe.unit.* and I’m a bit sad to see it go… It is perfect for adding tests for tiny libraries.


(Rudy Ges) #8

+1 for Buddy, with Enzyme when on a React project


(Christopher Mandlbaur) #9

Buddy is where its at.


(Laurent Deketelaere) #10

Thank you!
On my side I get You cannot add or remove poll options after the first 5 minutes. Please contact a moderator if you need to edit a poll option. ^^


(Uldis Baurovskis) #11

Nice to see so many Buddy users, we should spread word about it, as it took me some time till I got tests set up and running at the beginning :slight_smile: What I lack most in unit testing in haxe are stubs/mocks maybe someone knows some good lib that can mock functions and check if they were called, and what params were used ?


(Laurent Deketelaere) #12

http://lib.haxe.org/p/mockatoo/ is a good one, the official repo is not maintained, but if you look into the github network, you can find more recent version, like : https://github.com/DoclerLabs/mockatoo


(François Barbut) #13

I’m using haxe.unit.* but it was just a simple tool to start.

Wow, buddy looks very cool. I like the “natural language” style.


(François Barbut) #14

Which one(s) of these frameworks handle code coverage reports ?


(Uldis Baurovskis) #15

munit have build one


(Christopher Mandlbaur) #16

You can use mcover and mockatoo with any of these I think.