- goal
I’m trying to implement automatic testing of several native apps using Appium.
The steps would be as follow for each app:
- configure the Appium node with name and path of executable
- start the Appium node
- run my tests
- stop the node
- status
I have a first version implemented, that works for a single executable. When trying to do this cycle twice the problem is that the test starting the Appium node does not return until the test that stops the node kills the underlying process. First, obviously, I always have to run with at least “-j 2”. Then I cannot DEPEND on the startAppiumTest because he is never done, and then I m getting into all kind of race conditions.
it looks like that with a single executable:
ctest -I 1,7 -j 2
Test project /Users/agouaillard/Dashboards/csmMilliCastQtClients-86-Rel-build
Start 6: CleanInstallBuildTreeIfExist
Start 1: TestMillicastPlayer
1/7 Test #6: CleanInstallBuildTreeIfExist … Passed 0.03 sec
Start 7: InstallInBuildTree
2/7 Test #1: TestMillicastPlayer … Passed 0.21 sec
3/7 Test #7: InstallInBuildTree … Passed 22.35 sec
Start 3: MillicastPlayer-KiteCompile
Start 2: MillicastPlayer-LaunchAppiumNode
4/7 Test #3: MillicastPlayer-KiteCompile … Passed 2.31 sec
Start 4: MillicastPlayer-KiteRun
5/7 Test #4: MillicastPlayer-KiteRun … Passed 0.67 sec
Start 5: MillicastPlayer-killAppiumNode
6/7 Test #5: MillicastPlayer-killAppiumNode … Passed 0.02 sec
7/7 Test #2: MillicastPlayer-LaunchAppiumNode … Passed 3.00 sec
-
Question:
I’m trying to find how to launch a process and have the test return, and I have been failing.
This is what I am doing nowset( _appium_start_CMD ./${_app_name}-launchAppiumNode.sh )
set( _appium_stop_CMD pkill -9 -f appium )
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/launchAppiumNode.sh.in
${CMAKE_CURRENT_BINARY_DIR}/${_app_name}-launchAppiumNode.sh )
add_test(
NAME ${_app_name}-LaunchAppiumNode
COMMAND ${_appium_start_CMD}
WORKING_DIRECTORY “${CMAKE_CURRENT_BINARY_DIR}”
)
and this is the code of my launch command that would need some love:
‘’’
appium --node ./configs/appium/node.json &
exit
‘’’
What did I miss?