NullPointerException with command-runner-6.0.40_62 test create

Trying to create my first new test case. I think was having a similar problem today during our AWK meeting. Things seem to start up fine, but the command-runner eventually just errors out without creating anything.


get_system_performance_status.ind.txt

get_system_performance_status-5.4.input.txt


hawk@Tug:~/projects/indeni/indeni-knowledge/parsers/src/fortinet/fortigate$ command-runner.sh test create get_system_performance_status.ind test1 get_system_performance_status-5.4.input2017-11-14 15:12:43,702 INFO -- Starting command runner
2017-11-14 15:12:43,733 INFO -- Preparing test case "test1" for command "get_system_performance_status.ind"
[INFO] [11/14/2017 15:12:47.277] [Command-Runner-akka.actor.default-dispatcher-2] [akka://Command-Runner/user/CommandActor-Device:-Command:fortios-get-system-performance-status] Executor on receive execute command fortios-get-system-performance-status with operation Some(OperationRequest(SshOperation("get system performance status"),fortios-get-system-performance-status,Map(),Map())) 
[INFO] [11/14/2017 15:12:47.404] [Command-Runner-akka.actor.default-dispatcher-6] [akka://Command-Runner/user/CommandActor-Device:-Command:fortios-get-system-performance-status/HandlerFromCommand-fortios-get-system-performance-status-1] Command fortios-get-system-performance-status ran as monitoring for device (), returned 8 metrics: memory-usage (1), cpu-usage (6), uptime-seconds (1)
[INFO] [11/14/2017 15:12:47.411] [Command-Runner-akka.actor.default-dispatcher-6] [akka://Command-Runner/user/CommandActor-Device:-Command:fortios-get-system-performance-status/HandlerFromCommand-fortios-get-system-performance-status-1] Executor results indeni.collector.actors.messages.CollectionCommandSuccess
2017-11-14 15:12:47,437 ERROR -- Failed to prepare test case
java.lang.NullPointerException: null
at indeni.collector.commandrunner.testing.FileCommandParsingTestDao.indeni$collector$commandrunner$testing$FileCommandParsingTestDao$$resolveMainRepositoryPath$1(FileCommandParsingTestDao.scala:77)
at indeni.collector.commandrunner.testing.FileCommandParsingTestDao$$anonfun$2.apply(FileCommandParsingTestDao.scala:92)
at indeni.collector.commandrunner.testing.FileCommandParsingTestDao$$anonfun$2.apply(FileCommandParsingTestDao.scala:92)
at scala.Option.getOrElse(Option.scala:121)
at indeni.collector.commandrunner.testing.FileCommandParsingTestDao.resolveTestDirectoryPath(FileCommandParsingTestDao.scala:92)
at indeni.collector.commandrunner.testing.FileCommandParsingTestDao.resolveTestDescriptorPath(FileCommandParsingTestDao.scala:104)
at indeni.collector.commandrunner.testing.FileCommandParsingTestDao.read(FileCommandParsingTestDao.scala:43)
at indeni.collector.commandrunner.testing.FileCommandParsingTestDao.writeTestCase(FileCommandParsingTestDao.scala:61)
at indeni.collector.commandrunner.testing.CommandParsingTester.createTestCase(CommandParsingTester.scala:61)
at indeni.collector.commandrunner.CommandRunner$$anonfun$createTest$1.apply(CommandRunner.scala:158)
at indeni.collector.commandrunner.CommandRunner$$anonfun$createTest$1.apply(CommandRunner.scala:158)
at scala.Option.foreach(Option.scala:257)
at indeni.collector.commandrunner.CommandRunner.createTest(CommandRunner.scala:158)
at indeni.collector.commandrunner.CommandRunnerApp.run(CommandRunnerApp.scala:77)
at indeni.collector.commandrunner.CommandRunnerApp.run(CommandRunnerApp.scala:42)
at indeni.collector.commandrunner.CommandRunnerApp$.delayedEndpoint$indeni$collector$commandrunner$CommandRunnerApp$1(CommandRunnerApp.scala:12)
at indeni.collector.commandrunner.CommandRunnerApp$delayedInit$body.apply(CommandRunnerApp.scala:9)
at scala.Function0$class.apply$mcV$sp(Function0.scala:34)
at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
at scala.App$$anonfun$main$1.apply(App.scala:76)
at scala.App$$anonfun$main$1.apply(App.scala:76)
at scala.collection.immutable.List.foreach(List.scala:381)
at scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:35)
at scala.App$class.main(App.scala:76)
at indeni.collector.commandrunner.CommandRunnerApp$.main(CommandRunnerApp.scala:9)
at indeni.collector.commandrunner.CommandRunnerApp.main(CommandRunnerApp.scala)
2017-11-14 15:12:47,439 INFO -- Exiting

Thanks for the information Hawk. I'll get our engineering team to comment.

My bad, it's not handling non-absolute paths correctly.


We will distribute a fixed version shortly; in the meanwhile, you could invoke it with absolute paths.