← Back to team overview

sikuli-driver team mailing list archive

[Question #199533]: Running Sikuli Scripts from Schedular

 

New question #199533 on Sikuli:
https://answers.launchpad.net/sikuli/+question/199533

Hi Everyone,

I am new to Sikuli. 
I have created a test suite using sikuli - HTML Runner on my mac machine 10.7.3 for iOS application.

The scenario consists mainly two tasks 

1.  Launch our application in iPhone simulator.
2.  Execute the test suite and create HTML  test execution results.

When we are trying to execute from terminal and it is working fine.

The commands are as follows

To open the simulator: 

/Users/ezprintsqa/Downloads/FoneMonkey/bin/iphonesim launch /Users/ezprintsqa/Documents/Xcode/DerivedData/SnapCards-btmjdowsgmixpvdyfxfvhxtoihab/Build/Products/Debug-iphonesimulator/SnapCardsFoneMonkey.app&

Now the simulator will open along with the application

To execute the test cases:

/Users/ezprintsqa/Downloads/Sikuli-IDE.app/sikuli-ide.sh -r /Users/ezprintsqa/Downloads/SikuliWorkSpace/SnapcardsTestSuite.sikuli

The skill is working fine with the above commands and able to generate HTML  test execution results perfectly for both passed and failed test cases.

Now the story begins from here,

But, we need to run the testsuite using schedular so that we can monitor the app for every few hours
We created a shell script by using the above commands and setting up the schedular by using crontab -e command:
45 10 * * * sh SikuliTestSuite.sh

The schedular will start execution on 10.45 AM

My SikuliTestSuite.sh file actually consists of following code:

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>


kill -all iPhoneSimulator

sleep 10

/Users/ezprintsqa/Downloads/FoneMonkey/bin/iphonesim launch /Users/ezprintsqa/Documents/Xcode/DerivedData/SnapCards-btmjdowsgmixpvdyfxfvhxtoihab/Build/Products/Debug-iphonesimulator/SnapCardsFoneMonkey.app&

sleep 10

/Users/ezprintsqa/Downloads/Sikuli-IDE.app/sikuli-ide.sh -r /Users/ezprintsqa/Downloads/SikuliWorkSpace/SnapcardsTestSuite.sikuli

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

The result is:

We found the crontab successfully initiate the SikuliTestSuite.sh file.
It is able to launch iOS simulator but the problem is we cannot able to find the scripts are running or not because the sikuli script is not performing any action on simulator. But by the end of the execution it is able to create the Test Execution HTML report stating that all test cases are being passed.

NOTE: We intentionally modified the script to fail some test cases and monitor whether the scripts are executing at the background or not but still we are getting Test Execution HTML report stating that all test cases are being passed.

I wonder how this is happening.

I guess sikuli cannot able to identify/focus on iOS simulator. After launching the simulator, no where the scripts are getting executed. 

Please help me out.....!

Thanks,
Praveen



-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.