0

I am a lazy programmer. I want to automate test case generation of my large angularjs app. Currently, I am using jasmine and karma.

What I want is, to extract the module, components and methods dynamically and create a test case which should pass.

Basically, I want to add it to 'watch' so that as I am coding, the test cases get generated and get passed/failed based on the status the code and supplied mock data.

Please help.

JVM
  • 946
  • 1
  • 10
  • 23
  • Possible duplicate of [Is there a generator for jasmine angular controller tests?](http://stackoverflow.com/questions/31857701/is-there-a-generator-for-jasmine-angular-controller-tests) – Estus Flask Mar 08 '17 at 20:51
  • Its not the duplicate. I am not looking for boilerplate test. I need the fully functional and running test case. All the needed variables and methods are already present in the codebase. Its just a new file with some different syntax. Only thing extra is, mock data that is a next step. – JVM Mar 08 '17 at 21:02
  • The answers cover this to the point whether it is possible, [this answer](http://stackoverflow.com/a/32646994/3731501) for instance. There's nothing better, to my knowledge. Otherwise a lot of people would lose their jobs. – Estus Flask Mar 08 '17 at 21:16
  • I already tried tleaf, it generates a boilerplate for each controller you run it for. I am going to try to develop a generator as per my need, will post if I get anywhere with this. – JVM Mar 08 '17 at 22:11
  • Good luck with that, consider pinging me with @ if you will come up with the answer, it would be interesting to see. The task looks quite ambitious, because it will require to stub the entire `angular` API, also the code should likely run with Phantomjs or Jsdom to probe the methods which are defined inside functions. – Estus Flask Mar 08 '17 at 22:41

0 Answers0