Now I'm engaged in creating test cases for application writing on Erlang. I use common-test for it. This tool is useful and suits me. But most of the tests have the same structure and sometimes contain the same code. So, I have a lot of 'copy/paste'. It's not good. Would like to optimize my work. Probably, somebody had the same problem and found a solution. Please, help me!
Asked
Active
Viewed 175 times
2 Answers
1
Two possible solutions:
- Refactor your test code so that the common structure is a separate function that is reused by each test. Wrangler can help you refactor any Erlang code automatically, including tests.
- Switch over to EUnit so that you can use Test generating functions.

aronisstav
- 7,755
- 5
- 23
- 48
1
EUnit http://www.erlang.org/doc/apps/eunit/chapter.html
QuviqCheck - http://www.quviq.com/products/erlang-quickcheck/ - Good introduction can be found here: http://roberto-aloi.com/erlang/notes-on-erlang-quickcheck/
ProPer https://github.com/manopapad/proper/ - is a QuickCheck-inspired open-source property-based testing tool for Erlang

fycth
- 3,410
- 25
- 37
-
Thanks for your answer. As I understand QuviqCheck used for test data generating. Am I right? – pulitta Sep 17 '14 at 15:45
-
1Should also mention Proper, a GPL:ed QuickCheck clone: https://github.com/manopapad/proper/ – RichardC Apr 03 '17 at 09:17