Error occurred when running unit tests with the command monkeydo in vscode's terminal?

test: build
	@$(SDK_HOME)/bin/connectiq &&\
	sleep 3 &&\
	$(JAVA_OPTIONS) \
	$(SDK_HOME)/bin/monkeydo bin/$(appName).prg fr245 \t  
	#testHstack
	# this is a part of my makefile

As above. 

 When run

  

make test

, I will get the prompt like below.

/Users/xxxx/Library/Application\ Support/Garmin/ConnectIQ/Sdks/connectiq-sdk-mac-3.2.5-2021-02-12-6d31f4357/bin/monkeydo bin/APP.prg fr245 \t
ILLEGAL ARGUMENT: t

Why? I have followed the instructions from the document "CoreTopics" distributed with the SDK.

 

However, I can run no evil tests in the eclipse with the garmin plugin.  Is there anything different? Anyone can tell me?

Although I can run tests in the eclipse, the operation is not that convenient comparing to the makefile command

  • From the documentation you reference in your screenshot above, but about one paragraph further down...

    Run the App: Use the monkeydo script in your SDK’s bin directory with the /t flag to run the app with unit tests enabled - monkeydo.bat path\to\projects\bin\MyApp.prg /t

    You should be using /t but you are passing \t. These are not the same.

  • Yep, I have seen the command instructions on another page but screenshot this one.

    I changed to /t but the problem is not solved.

    test: build
    	@$(SDK_HOME)/bin/connectiq &&\
    	sleep 3 &&\
    	$(JAVA_OPTIONS) \
    	$(SDK_HOME)/bin/monkeydo bin/$(appName).prg /t  

  • Is the document deprecated?

    $ monkeydo
    Pushes and runs a Connect IQ executable on the Connect IQ simulator. The simulator must be running for this command to succeed.
    
    Usage: monkeydo executable device_id [-t | -t test_name]
        executable - A Connect IQ executable to run.
        device_id  - The device to simulate.
        test_name  - When providing the test flag you may specify a specific test name.
    test: build
    	@$(SDK_HOME)/bin/connectiq &&\
    	sleep 3 &&\
    	$(JAVA_OPTIONS) \
    	$(SDK_HOME)/bin/monkeydo bin/$(appName).prg fr245 -t testCalculateDx
    	
    	
    	
    -------------------------	
    output is:
    Error: Symbol Not Found Error
    Details: Failed invoking <symbol>
    Stack: 
    ------------------------------------------------------------------------------
    Executing test testCalculateDx...
    ERROR
    Encountered an app crash.
    make: *** [test] Error 2
    	
    

  • test: build
    	@$(SDK_HOME)/bin/connectiq &&\
    	sleep 3 &&\
    	$(JAVA_OPTIONS) \
    	$(SDK_HOME)/bin/monkeydo bin/$(appName).prg /t 

    Donesn't work at all

  • "/t" is for monkeydo.bat (Windows).

    "-t" is for monkeydo (MacOS/Linux).

    You'll see this if you look at the scripts in the SDK's bin directory.

    I suspect it's done this way to follow historical OS conventions. (Although in today's world of cross platform software, many tools use "unix-like" args on both Mac/Linux and Windows versions of the same tool. Even newer Windows-only tools follow the unix convention, which especially makes sense now that Windows ships with a Linux compatibility layer)

    Also FYI, in your original example, "\t" is no different than "t" (in that context.)

  • So what's the correct way to make tests with the command monkeydo  in Macos. I failed with the  command $(SDK_HOME)/bin/monkeydo bin/$(appName).prg fr245 -t testName. The menu Run no evils tests runs poorly in eclipse. I hate to click, looking forward to using command lines to finish build & test & deploy, and so forth.

  • As you can see, when you ran the command with "-t testCalculateDx", it failed a different way than when you ran with "\t".

    Error: Symbol Not Found Error
    Details: Failed invoking <symbol>

    IOW, it's not an args error this time. As a sanity check, I suggest omitting the test name and having it run all tests. e.g.

     $(SDK_HOME)/bin/monkeydo bin/$(appName).prg fr245 -t

  • I will try it tonight. Thanks, FlowState.

  • Error: Symbol Not Found Error
    Details: Failed invoking <symbol>
    Stack:
    ------------------------------------------------------------------------------
    Executing test testSortExchange...
    ERROR
    Encountered an app crash.
    make: *** [test] Error 2

    The command will throw a crash like below. However, I cannot see the error stack. Anyway to inspect it? 

    I have checked this discussions already.

    https://forums.garmin.com/developer/connect-iq/f/discussion/5009/app-crash-on-device

  • Sorry to ask the obvious, but do run no evil tests at least execute properly in Eclipse or VS Code?