question

kmd6076 avatar image
kmd6076 asked mallikarjunarao answered

itestrt not generating reports when executing from cron

I have a bash shell script that uses itestrt to execute a test case. When I execute the shell script manually from the command line the test runs and generates a report successfully. I edited the /etc/crontab file and added the shell script - the test starts and runs ok but the report is never generated. Here is the 'ps' output when the test is running - the scripts continue to run as itestrt is stuck generating the report: kdoherty@KD-iTest-VM ~/Scripts$ lps -ef | grep wire root 25015 25009 0 11:17 ? 00:00:00 /bin/sh -c ?/home/kdoherty/Scripts/cron_nightly_wireless_script.sh root 25021 25015 0 11:17 ? 00:00:00 /bin/sh /home/kdoherty/Scripts/cron_nightly_wireless_script.sh root 25023 25021 0 11:17 ? 00:00:00 sh /home/kdoherty/Scripts/nightly_wireless_script.sh root 25054 25023 0 11:17 ? 00:00:00 /bin/sh /home/kdoherty/iTest_4.1/iTestRT/itestrt --param ssids=SSIDS_PSK --param ap_firmware_build=6.7.1-9991 --itar /home/kdoherty/iTest_iTARs/ --test project://core/test_cases/wireless_script_aps/wireless_script_1940.fftc --report file:/mnt/orca/iTestReports/11-01-2013/wireless_script_1940_6.7.1-9991_11-01-2013.html --format /home/kdoherty/iTest_workspace/resources/reports22/test_report_templates/HTML root 25057 25054 10 11:17 ? 00:00:56 /home/kdoherty/iTest_4.1/iTestRT/../jre/bin/java -Xmx384M -Dfile.encoding=UTF-8 -XX:PermSize=64M -XX:MaxPermSize=128M -Dorg.eclipse.emf.ecore.plugin.EcorePlugin.doNotLoadResourcesPlugin=true -jar /home/kdoherty/iTest_4.1/iTestRT/plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar -consoleLog -data @none --param ssids=SSIDS_PSK --param ap_firmware_build=6.7.1-9991 --itar /home/kdoherty/iTest_iTARs/ --test project://core/test_cases/wireless_script_aps/wireless_script_1940.fftc --report file:/mnt/orca/iTestReports/11-01-2013/wireless_script_1940_6.7.1-9991_11-01-2013.html --format /home/kdoherty/iTest_workspace/resources/reports22/test_report_templates/HTML I noticed that the /tmp directory contains a lot of itestrt.xxx folders - should these be in the "/mnt/orca/iTestReports/11-01-2013/" directory?? kdoherty@KD-iTest-VM ~/Scripts$ ls -alhtr /tmp/ | grep itest. | tail -n5 drwxrwxr-x 5 kdoherty kdoherty 4.0K Nov 1 10:11 itestrt.3616489350591050051.report drwxrwxr-x 5 kdoherty kdoherty 4.0K Nov 1 10:31 itestrt.2224873490156346253.report drwxrwxr-x 5 kdoherty kdoherty 4.0K Nov 1 10:40 itestrt.1654324270748958576.report drwxrwxr-x 5 kdoherty kdoherty 4.0K Nov 1 11:02 itestrt.1966301502945459625.report drwxr-xr-x 5 root root 4.0K Nov 1 11:17 itestrt.339094779408628492.report Additional Info: Cron is sending an email after the test is executed and the mail contained the following error - not sure if it is related to generating the report: Exception in thread "DisplayServer" org.eclipse.swt.SWTError: No more handles [gtk_init_check() failed] at org.eclipse.swt.SWT.error(SWT.java:4109) at org.eclipse.swt.widgets.Display.createDisplay(Display.java:902) at org.eclipse.swt.widgets.Display.create(Display.java:890) at org.eclipse.swt.graphics.Device.(Device.java:154) at org.eclipse.swt.widgets.Display.(Display.java:499) at org.eclipse.swt.widgets.Display.(Display.java:490) at com.fnfr.svt.applications.web.ui.rt.DisplayServer$1.run(DisplayServer.java:27) at java.lang.Thread.run(Unknown Source)
iTestresults and reportingiTest Runtime (itestrt)cron
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

mallikarjunarao avatar image
mallikarjunarao answered
did open your iTest application when cron job was executing? For browser launch iTest application launch is mandatory.
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

mallikarjunarao avatar image
mallikarjunarao answered kmd6076 commented
I think this could itestrt console output You need to redirect itestrt console output to null. root 25054 25023 0 11:17 ? 00:00:00 /bin/sh /home/kdoherty/iTest_4.1/iTestRT/itestrt --param ssids=SSIDS_PSK --param ap_firmware_build=6.7.1-9991 --itar /home/kdoherty/iTest_iTARs/ --test project://core/test_cases/wireless_script_aps/wireless_script_1940.fftc --report file:/mnt/orca/iTestReports/11-01-2013/wireless_script_1940_6.7.1-9991_11-01-2013.html --format /home/kdoherty/iTest_workspace/resources/reports22/test_report_templates/HTML 2> /dev/null Here i am redirecting standard output to /dev/null, it will supress console output I hope this could help you.
1 comment
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

kmd6076 avatar image kmd6076 commented ·
I don't mind that the output is there, my issue is that the iTest Web browser is not being properly launched.
0 Likes 0 ·
udaya avatar image
udaya answered
It seems there are SWT errors and display issues with the OS. Please make sure you are on supported OS and gtk version. (details you can find in installtion guide)
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.