# Tests were not executed on linuxe

**URL:** <https://forum.katalon.com/t/tests-were-not-executed-on-linuxe/12571>\
**Category:** Bug Report\
**Tags:** bugs-report, katalon-studio\
**Created:** [August 10, 2018, 11:18am UTC](https://forum.katalon.com/t/tests-were-not-executed-on-linuxe/12571 "2018-08-10T11:18:48Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kyle\_Yao](https://avatars.discourse-cdn.com/v4/letter/k/7feea3/32.png) [@Kyle\_Yao](https://forum.katalon.com/u/Kyle_Yao)\
**Post date:** [August 10, 2018, 11:18am UTC](https://forum.katalon.com/t/tests-were-not-executed-on-linuxe/12571/1 "2018-08-10T11:18:48Z")

</div>

Hi Team.

I run the script on linux, but got following errors .

tail: test\_prod.log: file truncated

Request sent successfully.

!SESSION 2018-08-10 07:14:51.864 -----------------------------------------------

eclipse.buildId=unknown

java.version=1.8.0\_161

java.vendor=Oracle Corporation

BootLoader constants: OS=linux, ARCH=x86\_64, WS=gtk, NL=en\_US

Framework arguments: -propertiesFile=/home/atg/test\_new/configure/console\_prod.properties -runMode=console

Command-line arguments: -os linux -ws gtk -arch x86\_64 -data config -propertiesFile=/home/atg/test\_new/configure/console\_prod.properties -runMode=console -consoleLog

!ENTRY org.eclipse.core.resources 2 10035 2018-08-10 07:14:54.344

!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.

Starting Groovy-Eclipse compiler resolver. Specified compiler level: unspecified

136 2.4.7.xx-201611170128-e46 = ACTIVE

/%home%atg%test\_new%auto-test%Beacon\_Automation\_Test.prj/Keywords/com/beacon/global/Constant.groovy: 22 Groovy:unable to resolve class internal.GlobalVariable

/%home%atg%test\_new%auto-test%Beacon\_Automation\_Test.prj/Keywords/com/beacon/method/ObjectOperation.groovy: 28 Groovy:unable to resolve class internal.GlobalVariable

/%home%atg%test\_new%auto-test%Beacon\_Automation\_Test.prj/Keywords/com/beacon/global/Constant.groovy: 22 Groovy:unable to resolve class internal.GlobalVariable

/%home%atg%test\_new%auto-test%Beacon\_Automation\_Test.prj/Keywords/com/beacon/method/ObjectOperation.groovy: 28 Groovy:unable to resolve class internal.GlobalVariable

/%home%atg%test\_new%auto-test%Beacon\_Automation\_Test.prj/Keywords/com/beacon/method/Operation.groovy: 24 Groovy:unable to resolve class internal.GlobalVariable

/%home%atg%test\_new%auto-test%Beacon\_Automation\_Test.prj/Keywords/com/beacon/method/Operation.groovy: 24 Groovy:unable to resolve class internal.GlobalVariable

/%home%atg%test\_new%auto-test%Beacon\_Automation\_Test.prj/Keywords/com/beacon/method/RequestAndResponseOperation.groovy: 22 Groovy:unable to resolve class internal.GlobalVariable

/%home%atg%test\_new%auto-test%Beacon\_Automation\_Test.prj/Test Listeners/TestListener.groovy: 20 Groovy:unable to resolve class internal.GlobalVariable

/%home%atg%test\_new%auto-test%Beacon\_Automation\_Test.prj/Keywords/com/beacon/method/RequestAndResponseOperation.groovy: 22 Groovy:unable to resolve class internal.GlobalVariable

I’m not sure where is wrong.  
Katalon version : 5.6.0.

Thanks.

---

<div class="post-metadata">

**Author:** ![B\_L](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/b_l/32/976_2.png) [@B\_L](https://forum.katalon.com/u/B_L)\
**Post date:** [August 10, 2018, 11:39am UTC](https://forum.katalon.com/t/tests-were-not-executed-on-linuxe/12571/2 "2018-08-10T11:39:28Z")

</div>

Can we see the code? It’s looking like an issue with your keyword. Might be how the class is setup.

---

<div class="post-metadata">

**Author:** ![Kyle\_Yao](https://avatars.discourse-cdn.com/v4/letter/k/7feea3/32.png) [@Kyle\_Yao](https://forum.katalon.com/u/Kyle_Yao)\
**Post date:** [August 10, 2018, 1:40pm UTC](https://forum.katalon.com/t/tests-were-not-executed-on-linuxe/12571/3 "2018-08-10T13:40:57Z")

</div>

> B L said:
> 
> Can we see the code? It’s looking like an issue with your keyword. Might be how the class is setup.

BTW, I renamed the project. And this script is able to be run on my windows machine and another certenOS. But after copy to the new machine it not running.

Just Upload the keyword file is ok ?  
Seems not able to put groovy file at here.

---

<div class="post-metadata">

**Author:** ![Kyle\_Yao](https://avatars.discourse-cdn.com/v4/letter/k/7feea3/32.png) [@Kyle\_Yao](https://forum.katalon.com/u/Kyle_Yao)\
**Post date:** [August 10, 2018, 2:42pm UTC](https://forum.katalon.com/t/tests-were-not-executed-on-linuxe/12571/4 "2018-08-10T14:42:13Z")

</div>

> > B L said:
> > 
> > Can we see the code? It’s looking like an issue with your keyword. Might be how the class is setup.

Hi BL,

Seems like the mine issue is same as the issue mentioned in this one:

> **[Groovy Error: Unable to resolve class internal.GlobalVariable](https://forum.katalon.com/discussion/5380/groovy-error-unable-to-resolve-class-internal-globalvariable)**
>
> Hello, it seems that there is an error with the groovy scripting engine. \*\*OS \*\*(Windows 10 Pro 1709 16299.248 on VMWare): Katalon Studio Version (Katalon Studio Version: 5.3.0 Build: 1) ## Katalon Studio logs: empty for time period ##...

I also use the GlobalVariable in the customer keywords file. .

But still no solutions find in that discussion.

Thanks.

---

<div class="post-metadata">

**Author:** ![B\_L](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/b_l/32/976_2.png) [@B\_L](https://forum.katalon.com/u/B_L)\
**Post date:** [August 10, 2018, 3:18pm UTC](https://forum.katalon.com/t/tests-were-not-executed-on-linuxe/12571/5 "2018-08-10T15:18:13Z")

</div>

Yes you can copy and paste the keyword here. Do you have import internal.GlobalVariable in keyword? is any error thrown in script for keyword?

---

<div class="post-metadata">

**Author:** ![Kyle\_Yao](https://avatars.discourse-cdn.com/v4/letter/k/7feea3/32.png) [@Kyle\_Yao](https://forum.katalon.com/u/Kyle_Yao)\
**Post date:** [August 11, 2018, 1:36am UTC](https://forum.katalon.com/t/tests-were-not-executed-on-linuxe/12571/6 "2018-08-11T01:36:32Z")

</div>

> B L said:
> 
> Yes you can copy and paste the keyword here. Do you have import internal.GlobalVariable in keyword? is any error thrown in script for keyword?

Hi BL,

Yes, I’ve imported the internal.GlobalVariable in keyword as well as the Test listeners.

Following is the code for listeners.

import static com.kms.katalon.core.checkpoint.CheckpointFactory.findCheckpoint

import static com.kms.katalon.core.testcase.TestCaseFactory.findTestCase

import static com.kms.katalon.core.testdata.TestDataFactory.findTestData

import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject

import java.util.concurrent.TimeoutException

import com.kms.katalon.core.checkpoint.Checkpoint as Checkpoint

import com.kms.katalon.core.model.FailureHandling as FailureHandling

import com.kms.katalon.core.testcase.TestCase as TestCase

import com.kms.katalon.core.testdata.TestData as TestData

import com.kms.katalon.core.testobject.RequestObject

import com.kms.katalon.core.testobject.ResponseObject

import com.kms.katalon.core.testobject.TestObject as TestObject

import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS

import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI

import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as Mobile

import internal.GlobalVariable as GlobalVariable

import com.kms.katalon.core.annotation.BeforeTestCase

import com.kms.katalon.core.annotation.BeforeTestSuite

import com.kms.katalon.core.annotation.AfterTestCase

import com.kms.katalon.core.annotation.AfterTestSuite

import com.kms.katalon.core.context.TestCaseContext

import com.kms.katalon.core.context.TestSuiteContext

class TestListener {

/\*\*

\* Executes before every test case starts.

\* @param testCaseContext related information of the executed test case.

\*/

@BeforeTestCase

def sampleBeforeTestCase(TestCaseContext testCaseContext) {

println testCaseContext.getTestCaseId()

println testCaseContext.getTestCaseVariables()

Map veriables = testCaseContext.getTestCaseVariables()

def caseType = veriables.containsKey(“caseType”)

def caseTypeValue = veriables.containsValue(“API”)

if(caseTypeValue){

WebUI.comment(“\*\*\*\*\*\*\*\*\*\*\*\*API case, no need to open browser.”)

}else{

WebUI.openBrowser(null)

try {

WebUI.maximizeWindow()

} catch (Exception e) {

e.printStackTrace()

}

}

}

/\*\*

\* Executes after every test case ends.

\* @param testCaseContext related information of the executed test case.

\*/

@AfterTestCase

def sampleAfterTestCase(TestCaseContext testCaseContext) {

println testCaseContext.getTestCaseId()

println testCaseContext.getTestCaseStatus()

Map veriables = testCaseContext.getTestCaseVariables()

def caseType = veriables.containsKey(“caseType”)

def caseTypeValue = veriables.containsValue(“API”)

if(GlobalVariable.G\_RunningStatus)

{

if(testCaseContext.getTestCaseStatus() == “ERROR”)

{

GlobalVariable.G\_RunningStatus = false

} else

{

println testCaseContext.getTestCaseId() + " = Pass ~"

}

if(caseTypeValue){

WebUI.comment(“\*\*\*\*\*\*\*\*\*\*\*\*API case, no need to close browser.”)

RequestObject logoutReq= CustomKeywords.‘com.beacon.method.ObjectOperation.addHeaderCookieValueToRequest’(GlobalVariable.G\_CookieValue,

findTestObject(‘Request/Hover Api/My Account/REST - Logout’, [(‘siteURL’) : GlobalVariable.G\_SiteURL]))

ResponseObject response = WS.sendRequest(logoutReq)

def statusCode = response.getStatusCode()

if(statusCode == 200){

def responseText = response.getResponseText()

println responseText

if (responseText.contains(‘“messageInfo”:“Logout successful”’)) {

WS.comment(“\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*Logout Successfully.”)

assert true

} else {

WS.comment(‘\*\*\*\*\*\* Response status code is 200, response text is: \n’ + responseText)

assert false : responseText

}

}

}else{

try {

String currentURL = WebUI.getUrl()

if(!currentURL.contains(“/register”))

{

WebUI.navigateToUrl(GlobalVariable.G\_SiteURL)

WebUI.waitForPageLoad(GlobalVariable.G\_TimeOut)

WebUI.delay(GlobalVariable.G\_WaitTime)

WebUI.callTestCase(findTestCase(‘Test Case/Header/Global/Logout From Site’), [:], FailureHandling.STOP\_ON\_FAILURE)

WebUI.comment(“\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*Logout from Store.”)

}else{

WebUI.comment(“\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*Alreay logged out.”)

}

WebUI.comment(“\*\*\*\*\*\*\*\*\*\*\*\*\*\*Close bowser.”)

WebUI.closeBrowser()

} catch (TimeoutException e) {

e.printStackTrace()

}

}

} else

{

println "GlobalVariable.G\_RunningStatus is false when execute " + testCaseContext.getTestCaseId()

}

}

}

Do to some reason, we need to logout from site after testing. So I need this kinds of Global Variables.

---

<div class="post-metadata">

**Author:** ![Kyle\_Yao](https://avatars.discourse-cdn.com/v4/letter/k/7feea3/32.png) [@Kyle\_Yao](https://forum.katalon.com/u/Kyle_Yao)\
**Post date:** [August 12, 2018, 4:33am UTC](https://forum.katalon.com/t/tests-were-not-executed-on-linuxe/12571/7 "2018-08-12T04:33:12Z")

</div>

> B L said:
> 
> Yes you can copy and paste the keyword here. Do you have import internal.GlobalVariable in keyword? is any error thrown in script for keyword?

HI BL,  
I’ve removed the imported global variables from my keywords.

But still get such kind of error when run scripts on Linux

!SESSION 2018-08-12 00:20:35.073 -----------------------------------------------

eclipse.buildId=unknown

java.version=1.8.0\_161

java.vendor=Oracle Corporation

BootLoader constants: OS=linux, ARCH=x86\_64, WS=gtk, NL=en\_US

Framework arguments: -propertiesFile=/home/atg/test\_new/configure/console\_prod.properties -runMode=console

Command-line arguments: -os linux -ws gtk -arch x86\_64 -data config -propertiesFile=/home/atg/test\_new/configure/console\_prod.properties -runMode=console -consoleLog

!ENTRY org.eclipse.core.resources 2 10035 2018-08-12 00:20:37.637

!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.

Starting Groovy-Eclipse compiler resolver. Specified compiler level: unspecified

136 2.4.7.xx-201611170128-e46 = ACTIVE

Any suggestions? Thanks a lot.

---

<div class="post-metadata">

**Author:** ![Kyle\_Yao](https://avatars.discourse-cdn.com/v4/letter/k/7feea3/32.png) [@Kyle\_Yao](https://forum.katalon.com/u/Kyle_Yao)\
**Post date:** [August 12, 2018, 9:32am UTC](https://forum.katalon.com/t/tests-were-not-executed-on-linuxe/12571/8 "2018-08-12T09:32:43Z")

</div>

> B L said:
> 
> Yes you can copy and paste the keyword here. Do you have import internal.GlobalVariable in keyword? is any error thrown in script for keyword?

I found that when run katalon in linux, I got following errors

Test suite ‘Test Suites/Test Suite Collection/Prod/Prod\_BVT’ not found.

---

<div class="post-metadata">

**Author:** ![Kyle\_Yao](https://avatars.discourse-cdn.com/v4/letter/k/7feea3/32.png) [@Kyle\_Yao](https://forum.katalon.com/u/Kyle_Yao)\
**Post date:** [August 12, 2018, 9:59am UTC](https://forum.katalon.com/t/tests-were-not-executed-on-linuxe/12571/9 "2018-08-12T09:59:45Z")

</div>

> [B L](https://forum.katalon.com/profile/140/B%20L) said:
> 
> Yes you can copy and paste the keyword here. Do you have import internal.GlobalVariable in keyword? is any error thrown in script for keyword?

Thanks BL, I’ve resolved the issue. thank a lot.

---

<div class="post-metadata">

**Author:** ![B\_L](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/b_l/32/976_2.png) [@B\_L](https://forum.katalon.com/u/B_L)\
**Post date:** [February 5, 2019, 3:56pm UTC](https://forum.katalon.com/t/tests-were-not-executed-on-linuxe/12571/10 "2019-02-05T15:56:44Z")

</div>

Sorry for the delayed response this thread got buried on me :S I’m glad you resolved it though 🙂

---

<div class="post-metadata">

**Author:** ![system](https://europe1.discourse-cdn.com/katalon/original/3X/d/5/d55596ab02785a255798e87ede769734747b30c4.svg) [@system](https://forum.katalon.com/u/system)\
**Post date:** [February 5, 2020, 3:56pm UTC](https://forum.katalon.com/t/tests-were-not-executed-on-linuxe/12571/11 "2020-02-05T15:56:45Z")

</div>

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
