Re: [Dev] Integration tests for WSO2 IOT Server
Hi, The issue was fixed with custom extensions and it's working fine. Thank you very much for the help guys. Best regards, Menaka On Wed, Jan 4, 2017 at 10:27 AM, Menaka Jayawardena wrote: > Hi Sumedha, > > When using the single script, it does not start the servers. It hangs > until timeout. > > I think as Nuwan mentioned, we have to write a custom extension to start > the servers that we need. But the problem it, if we do so we have to > rewrite the whole flow as test framework has concrete classes to get the > carbon home dir and start the server. We have to change that. > > I also spoke to Azeez regarding this issue and he said that we have to > debug the test framework and find the issue. So we can fix it and get a > release from them. > > Thanks and Regards, > Menaka > > > On Wed, Jan 4, 2017 at 9:31 AM, Sumedha Rubasinghe > wrote: > >> Menaka, >> For now, shall we not start the servers using this single script?. It's >> bit complex to trouble shoot with all logs going to a single file. >> >> On Tue, Jan 3, 2017 at 12:48 PM, Menaka Jayawardena >> wrote: >> >>> Hi, >>> >>> In IOTS we have 3 separate servers (Analytics, Broker and IOT Core), >>> which are invoked by a single shell script. (Or we can manually start each >>> server individually). And in order to execute a full IOT scenario, all the >>> three servers have to be up and running. >>> >>> There were some integration tests which were written before this change >>> (Separating the servers), which test scenarios such as user login, device >>> type installation, and virtual device enrollment etc. >>> >>> As Test Automation Framework looks for wso2server.sh in >>> {carbon_home}/bin directory, I renamed the script. (was start-all.sh) >>> >>> When running, I got the following error. >>> >>> I think as the servers are started in processes forked by the >>> 'start-all' script TAF does not have the access to the logs. >>> >>> Is there any fix for this issue? >>> >>> Can we change the script location in test configuration file? >>> >>> - ERROR MSG -- >>> >>> INFO: Starting carbon server. >>> Jan 03, 2017 12:08:15 PM org.wso2.carbon.automation.ext >>> ensions.servers.carbonserver.CarbonServerExtension handleException >>> SEVERE: Fail to start carbon server >>> java.lang.RuntimeException: Port 9763 is not open >>> at org.wso2.carbon.automation.extensions.servers.utils.ClientCo >>> nnectionUtil.waitForPort(ClientConnectionUtil.java:248) >>> at org.wso2.carbon.automation.extensions.servers.carbonserver.C >>> arbonServerManager.startServerUsingCarbonHome(CarbonServerMa >>> nager.java:120) >>> at org.wso2.carbon.automation.extensions.servers.carbonserver.T >>> estServerManager.startServer(TestServerManager.java:116) >>> at org.wso2.carbon.automation.extensions.servers.carbonserver.C >>> arbonServerExtension.onExecutionStart(CarbonServerExtension.java:50) >>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce >>> ssorImpl.java:62) >>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe >>> thodAccessorImpl.java:43) >>> at java.lang.reflect.Method.invoke(Method.java:498) >>> at org.wso2.carbon.automation.engine.extensions.TestNGExtension >>> Executor.executeExtensible(TestNGExtensionExecutor.java:75) >>> at org.wso2.carbon.automation.engine.testlisteners.TestExecutio >>> nListener.onExecutionStart(TestExecutionListener.java:47) >>> at org.testng.TestNG.runExecutionListeners(TestNG.java:1068) >>> at org.testng.TestNG.run(TestNG.java:1015) >>> at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGEx >>> ecutor.java:295) >>> at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute( >>> TestNGXmlTestSuite.java:84) >>> at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestN >>> GProvider.java:90) >>> at org.apache.maven.surefire.booter.ForkedBooter.invokeProvider >>> InSameClassLoader(ForkedBooter.java:203) >>> at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInPro >>> cess(ForkedBooter.java:155) >>> at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBoo >>> ter.java:103) >>> >>> Jan 03, 2017 12:08:15 PM org.wso2.carbon.automation.eng >>> ine.testlisteners.TestExecutionListener handleException >>> SEVERE: Execution error occurred in TestExecutionListener:- >>> java.lang.reflect.InvocationTargetException >>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce >>> ssorImpl.java:62) >>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe >>> thodAccessorImpl.java:43) >>> at java.lang.reflect.Method.invoke(Method.java:498) >>> at org.wso2.carbon.automation.engine.extensions.TestNGExtension >>> Executor.executeExtensible(TestNGExtensionExecutor.java:75) >>> at org.wso2.carbon.automation.engine.testlisteners.TestExecutio >>> nListener.onExecutionStart(TestExecutionListener.java:47) >>> at org.testng.TestNG
Re: [Dev] Integration tests for WSO2 IOT Server
Hi Sumedha, When using the single script, it does not start the servers. It hangs until timeout. I think as Nuwan mentioned, we have to write a custom extension to start the servers that we need. But the problem it, if we do so we have to rewrite the whole flow as test framework has concrete classes to get the carbon home dir and start the server. We have to change that. I also spoke to Azeez regarding this issue and he said that we have to debug the test framework and find the issue. So we can fix it and get a release from them. Thanks and Regards, Menaka On Wed, Jan 4, 2017 at 9:31 AM, Sumedha Rubasinghe wrote: > Menaka, > For now, shall we not start the servers using this single script?. It's > bit complex to trouble shoot with all logs going to a single file. > > On Tue, Jan 3, 2017 at 12:48 PM, Menaka Jayawardena > wrote: > >> Hi, >> >> In IOTS we have 3 separate servers (Analytics, Broker and IOT Core), >> which are invoked by a single shell script. (Or we can manually start each >> server individually). And in order to execute a full IOT scenario, all the >> three servers have to be up and running. >> >> There were some integration tests which were written before this change >> (Separating the servers), which test scenarios such as user login, device >> type installation, and virtual device enrollment etc. >> >> As Test Automation Framework looks for wso2server.sh in {carbon_home}/bin >> directory, I renamed the script. (was start-all.sh) >> >> When running, I got the following error. >> >> I think as the servers are started in processes forked by the 'start-all' >> script TAF does not have the access to the logs. >> >> Is there any fix for this issue? >> >> Can we change the script location in test configuration file? >> >> - ERROR MSG -- >> >> INFO: Starting carbon server. >> Jan 03, 2017 12:08:15 PM org.wso2.carbon.automation.ext >> ensions.servers.carbonserver.CarbonServerExtension handleException >> SEVERE: Fail to start carbon server >> java.lang.RuntimeException: Port 9763 is not open >> at org.wso2.carbon.automation.extensions.servers.utils.ClientCo >> nnectionUtil.waitForPort(ClientConnectionUtil.java:248) >> at org.wso2.carbon.automation.extensions.servers.carbonserver.C >> arbonServerManager.startServerUsingCarbonHome(CarbonServerMa >> nager.java:120) >> at org.wso2.carbon.automation.extensions.servers.carbonserver.T >> estServerManager.startServer(TestServerManager.java:116) >> at org.wso2.carbon.automation.extensions.servers.carbonserver.C >> arbonServerExtension.onExecutionStart(CarbonServerExtension.java:50) >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce >> ssorImpl.java:62) >> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe >> thodAccessorImpl.java:43) >> at java.lang.reflect.Method.invoke(Method.java:498) >> at org.wso2.carbon.automation.engine.extensions.TestNGExtension >> Executor.executeExtensible(TestNGExtensionExecutor.java:75) >> at org.wso2.carbon.automation.engine.testlisteners.TestExecutio >> nListener.onExecutionStart(TestExecutionListener.java:47) >> at org.testng.TestNG.runExecutionListeners(TestNG.java:1068) >> at org.testng.TestNG.run(TestNG.java:1015) >> at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGEx >> ecutor.java:295) >> at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute( >> TestNGXmlTestSuite.java:84) >> at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestN >> GProvider.java:90) >> at org.apache.maven.surefire.booter.ForkedBooter.invokeProvider >> InSameClassLoader(ForkedBooter.java:203) >> at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInPro >> cess(ForkedBooter.java:155) >> at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBoo >> ter.java:103) >> >> Jan 03, 2017 12:08:15 PM org.wso2.carbon.automation.eng >> ine.testlisteners.TestExecutionListener handleException >> SEVERE: Execution error occurred in TestExecutionListener:- >> java.lang.reflect.InvocationTargetException >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce >> ssorImpl.java:62) >> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe >> thodAccessorImpl.java:43) >> at java.lang.reflect.Method.invoke(Method.java:498) >> at org.wso2.carbon.automation.engine.extensions.TestNGExtension >> Executor.executeExtensible(TestNGExtensionExecutor.java:75) >> at org.wso2.carbon.automation.engine.testlisteners.TestExecutio >> nListener.onExecutionStart(TestExecutionListener.java:47) >> at org.testng.TestNG.runExecutionListeners(TestNG.java:1068) >> at org.testng.TestNG.run(TestNG.java:1015) >> at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGEx >> ecutor.java:295) >> at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute( >> TestNGXmlTestSuite.java:84) >> at org.apache.maven.surefire.testng.TestNG
Re: [Dev] Integration tests for WSO2 IOT Server
Menaka, For now, shall we not start the servers using this single script?. It's bit complex to trouble shoot with all logs going to a single file. On Tue, Jan 3, 2017 at 12:48 PM, Menaka Jayawardena wrote: > Hi, > > In IOTS we have 3 separate servers (Analytics, Broker and IOT Core), which > are invoked by a single shell script. (Or we can manually start each server > individually). And in order to execute a full IOT scenario, all the three > servers have to be up and running. > > There were some integration tests which were written before this change > (Separating the servers), which test scenarios such as user login, device > type installation, and virtual device enrollment etc. > > As Test Automation Framework looks for wso2server.sh in {carbon_home}/bin > directory, I renamed the script. (was start-all.sh) > > When running, I got the following error. > > I think as the servers are started in processes forked by the 'start-all' > script TAF does not have the access to the logs. > > Is there any fix for this issue? > > Can we change the script location in test configuration file? > > - ERROR MSG -- > > INFO: Starting carbon server. > Jan 03, 2017 12:08:15 PM org.wso2.carbon.automation.ext > ensions.servers.carbonserver.CarbonServerExtension handleException > SEVERE: Fail to start carbon server > java.lang.RuntimeException: Port 9763 is not open > at org.wso2.carbon.automation.extensions.servers.utils.ClientCo > nnectionUtil.waitForPort(ClientConnectionUtil.java:248) > at org.wso2.carbon.automation.extensions.servers.carbonserver.C > arbonServerManager.startServerUsingCarbonHome(CarbonServerMa > nager.java:120) > at org.wso2.carbon.automation.extensions.servers.carbonserver.T > estServerManager.startServer(TestServerManager.java:116) > at org.wso2.carbon.automation.extensions.servers.carbonserver.C > arbonServerExtension.onExecutionStart(CarbonServerExtension.java:50) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce > ssorImpl.java:62) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe > thodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at org.wso2.carbon.automation.engine.extensions.TestNGExtension > Executor.executeExtensible(TestNGExtensionExecutor.java:75) > at org.wso2.carbon.automation.engine.testlisteners.TestExecutio > nListener.onExecutionStart(TestExecutionListener.java:47) > at org.testng.TestNG.runExecutionListeners(TestNG.java:1068) > at org.testng.TestNG.run(TestNG.java:1015) > at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGEx > ecutor.java:295) > at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute( > TestNGXmlTestSuite.java:84) > at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestN > GProvider.java:90) > at org.apache.maven.surefire.booter.ForkedBooter.invokeProvider > InSameClassLoader(ForkedBooter.java:203) > at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInPro > cess(ForkedBooter.java:155) > at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBoo > ter.java:103) > > Jan 03, 2017 12:08:15 PM org.wso2.carbon.automation.eng > ine.testlisteners.TestExecutionListener handleException > SEVERE: Execution error occurred in TestExecutionListener:- > java.lang.reflect.InvocationTargetException > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce > ssorImpl.java:62) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe > thodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at org.wso2.carbon.automation.engine.extensions.TestNGExtension > Executor.executeExtensible(TestNGExtensionExecutor.java:75) > at org.wso2.carbon.automation.engine.testlisteners.TestExecutio > nListener.onExecutionStart(TestExecutionListener.java:47) > at org.testng.TestNG.runExecutionListeners(TestNG.java:1068) > at org.testng.TestNG.run(TestNG.java:1015) > at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGEx > ecutor.java:295) > at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute( > TestNGXmlTestSuite.java:84) > at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestN > GProvider.java:90) > at org.apache.maven.surefire.booter.ForkedBooter.invokeProvider > InSameClassLoader(ForkedBooter.java:203) > at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInPro > cess(ForkedBooter.java:155) > at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBoo > ter.java:103) > Caused by: java.lang.RuntimeException: Fail to start carbon server > at org.wso2.carbon.automation.extensions.servers.carbonserver.C > arbonServerExtension.handleException(CarbonServerExtension.java:70) > at org.wso2.carbon.automation.extensions.servers.carbonserver.C > arbonServerExtension.onExecutionStart(CarbonServerExtension.java:54) > ... 14 more > Caused by: java.lang.RuntimeException:
Re: [Dev] Integration tests for WSO2 IOT Server
Looping IOT team On Tue, Jan 3, 2017 at 5:04 PM, Menaka Jayawardena wrote: > Hi Nuwan, > > The Server does not start and the testing process hangs at 'INFO: Starting > Carbon Server...' until the timeout. > > Another way is that You can write an extension to start the servers >> separately > > > Yes. I also think this would be a better option. I'll look into that. > > Thank you very much Nuwan. > > Best regards. > Menaka > > > > On Tue, Jan 3, 2017 at 1:58 PM, Nuwan Wimalasekara > wrote: > >> Hi Menaka, >> >> Is the server started on port 9763? Please make sure that service is >> started properly >> >> Another ways is that You can write a extension to start the servers >> separately. >> >> Thanks, >> Nuwanw >> >> On Tue, Jan 3, 2017 at 12:48 PM, Menaka Jayawardena >> wrote: >> >>> Hi, >>> >>> In IOTS we have 3 separate servers (Analytics, Broker and IOT Core), >>> which are invoked by a single shell script. (Or we can manually start each >>> server individually). And in order to execute a full IOT scenario, all the >>> three servers have to be up and running. >>> >>> There were some integration tests which were written before this change >>> (Separating the servers), which test scenarios such as user login, device >>> type installation, and virtual device enrollment etc. >>> >>> As Test Automation Framework looks for wso2server.sh in >>> {carbon_home}/bin directory, I renamed the script. (was start-all.sh) >>> >>> When running, I got the following error. >>> >>> I think as the servers are started in processes forked by the >>> 'start-all' script TAF does not have the access to the logs. >>> >>> Is there any fix for this issue? >>> >>> Can we change the script location in test configuration file? >>> >>> - ERROR MSG -- >>> >>> INFO: Starting carbon server. >>> Jan 03, 2017 12:08:15 PM org.wso2.carbon.automation.ext >>> ensions.servers.carbonserver.CarbonServerExtension handleException >>> SEVERE: Fail to start carbon server >>> java.lang.RuntimeException: Port 9763 is not open >>> at org.wso2.carbon.automation.extensions.servers.utils.ClientCo >>> nnectionUtil.waitForPort(ClientConnectionUtil.java:248) >>> at org.wso2.carbon.automation.extensions.servers.carbonserver.C >>> arbonServerManager.startServerUsingCarbonHome(CarbonServerMa >>> nager.java:120) >>> at org.wso2.carbon.automation.extensions.servers.carbonserver.T >>> estServerManager.startServer(TestServerManager.java:116) >>> at org.wso2.carbon.automation.extensions.servers.carbonserver.C >>> arbonServerExtension.onExecutionStart(CarbonServerExtension.java:50) >>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce >>> ssorImpl.java:62) >>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe >>> thodAccessorImpl.java:43) >>> at java.lang.reflect.Method.invoke(Method.java:498) >>> at org.wso2.carbon.automation.engine.extensions.TestNGExtension >>> Executor.executeExtensible(TestNGExtensionExecutor.java:75) >>> at org.wso2.carbon.automation.engine.testlisteners.TestExecutio >>> nListener.onExecutionStart(TestExecutionListener.java:47) >>> at org.testng.TestNG.runExecutionListeners(TestNG.java:1068) >>> at org.testng.TestNG.run(TestNG.java:1015) >>> at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGEx >>> ecutor.java:295) >>> at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute( >>> TestNGXmlTestSuite.java:84) >>> at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestN >>> GProvider.java:90) >>> at org.apache.maven.surefire.booter.ForkedBooter.invokeProvider >>> InSameClassLoader(ForkedBooter.java:203) >>> at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInPro >>> cess(ForkedBooter.java:155) >>> at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBoo >>> ter.java:103) >>> >>> Jan 03, 2017 12:08:15 PM org.wso2.carbon.automation.eng >>> ine.testlisteners.TestExecutionListener handleException >>> SEVERE: Execution error occurred in TestExecutionListener:- >>> java.lang.reflect.InvocationTargetException >>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce >>> ssorImpl.java:62) >>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe >>> thodAccessorImpl.java:43) >>> at java.lang.reflect.Method.invoke(Method.java:498) >>> at org.wso2.carbon.automation.engine.extensions.TestNGExtension >>> Executor.executeExtensible(TestNGExtensionExecutor.java:75) >>> at org.wso2.carbon.automation.engine.testlisteners.TestExecutio >>> nListener.onExecutionStart(TestExecutionListener.java:47) >>> at org.testng.TestNG.runExecutionListeners(TestNG.java:1068) >>> at org.testng.TestNG.run(TestNG.java:1015) >>> at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGEx >>> ecutor.java:295) >>> at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute( >>> TestNGXmlTestSuite.java:84) >>> at org
Re: [Dev] Integration tests for WSO2 IOT Server
Hi Nuwan, The Server does not start and the testing process hangs at 'INFO: Starting Carbon Server...' until the timeout. Another way is that You can write an extension to start the servers > separately Yes. I also think this would be a better option. I'll look into that. Thank you very much Nuwan. Best regards. Menaka On Tue, Jan 3, 2017 at 1:58 PM, Nuwan Wimalasekara wrote: > Hi Menaka, > > Is the server started on port 9763? Please make sure that service is > started properly > > Another ways is that You can write a extension to start the servers > separately. > > Thanks, > Nuwanw > > On Tue, Jan 3, 2017 at 12:48 PM, Menaka Jayawardena > wrote: > >> Hi, >> >> In IOTS we have 3 separate servers (Analytics, Broker and IOT Core), >> which are invoked by a single shell script. (Or we can manually start each >> server individually). And in order to execute a full IOT scenario, all the >> three servers have to be up and running. >> >> There were some integration tests which were written before this change >> (Separating the servers), which test scenarios such as user login, device >> type installation, and virtual device enrollment etc. >> >> As Test Automation Framework looks for wso2server.sh in {carbon_home}/bin >> directory, I renamed the script. (was start-all.sh) >> >> When running, I got the following error. >> >> I think as the servers are started in processes forked by the 'start-all' >> script TAF does not have the access to the logs. >> >> Is there any fix for this issue? >> >> Can we change the script location in test configuration file? >> >> - ERROR MSG -- >> >> INFO: Starting carbon server. >> Jan 03, 2017 12:08:15 PM org.wso2.carbon.automation.ext >> ensions.servers.carbonserver.CarbonServerExtension handleException >> SEVERE: Fail to start carbon server >> java.lang.RuntimeException: Port 9763 is not open >> at org.wso2.carbon.automation.extensions.servers.utils.ClientCo >> nnectionUtil.waitForPort(ClientConnectionUtil.java:248) >> at org.wso2.carbon.automation.extensions.servers.carbonserver.C >> arbonServerManager.startServerUsingCarbonHome(CarbonServerMa >> nager.java:120) >> at org.wso2.carbon.automation.extensions.servers.carbonserver.T >> estServerManager.startServer(TestServerManager.java:116) >> at org.wso2.carbon.automation.extensions.servers.carbonserver.C >> arbonServerExtension.onExecutionStart(CarbonServerExtension.java:50) >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce >> ssorImpl.java:62) >> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe >> thodAccessorImpl.java:43) >> at java.lang.reflect.Method.invoke(Method.java:498) >> at org.wso2.carbon.automation.engine.extensions.TestNGExtension >> Executor.executeExtensible(TestNGExtensionExecutor.java:75) >> at org.wso2.carbon.automation.engine.testlisteners.TestExecutio >> nListener.onExecutionStart(TestExecutionListener.java:47) >> at org.testng.TestNG.runExecutionListeners(TestNG.java:1068) >> at org.testng.TestNG.run(TestNG.java:1015) >> at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGEx >> ecutor.java:295) >> at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute( >> TestNGXmlTestSuite.java:84) >> at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestN >> GProvider.java:90) >> at org.apache.maven.surefire.booter.ForkedBooter.invokeProvider >> InSameClassLoader(ForkedBooter.java:203) >> at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInPro >> cess(ForkedBooter.java:155) >> at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBoo >> ter.java:103) >> >> Jan 03, 2017 12:08:15 PM org.wso2.carbon.automation.eng >> ine.testlisteners.TestExecutionListener handleException >> SEVERE: Execution error occurred in TestExecutionListener:- >> java.lang.reflect.InvocationTargetException >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce >> ssorImpl.java:62) >> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe >> thodAccessorImpl.java:43) >> at java.lang.reflect.Method.invoke(Method.java:498) >> at org.wso2.carbon.automation.engine.extensions.TestNGExtension >> Executor.executeExtensible(TestNGExtensionExecutor.java:75) >> at org.wso2.carbon.automation.engine.testlisteners.TestExecutio >> nListener.onExecutionStart(TestExecutionListener.java:47) >> at org.testng.TestNG.runExecutionListeners(TestNG.java:1068) >> at org.testng.TestNG.run(TestNG.java:1015) >> at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGEx >> ecutor.java:295) >> at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute( >> TestNGXmlTestSuite.java:84) >> at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestN >> GProvider.java:90) >> at org.apache.maven.surefire.booter.ForkedBooter.invokeProvider >> InSameClassLoader(ForkedBooter.java:203) >> at org.apache.
Re: [Dev] Integration tests for WSO2 IOT Server
Hi Menaka, Is the server started on port 9763? Please make sure that service is started properly Another ways is that You can write a extension to start the servers separately. Thanks, Nuwanw On Tue, Jan 3, 2017 at 12:48 PM, Menaka Jayawardena wrote: > Hi, > > In IOTS we have 3 separate servers (Analytics, Broker and IOT Core), which > are invoked by a single shell script. (Or we can manually start each server > individually). And in order to execute a full IOT scenario, all the three > servers have to be up and running. > > There were some integration tests which were written before this change > (Separating the servers), which test scenarios such as user login, device > type installation, and virtual device enrollment etc. > > As Test Automation Framework looks for wso2server.sh in {carbon_home}/bin > directory, I renamed the script. (was start-all.sh) > > When running, I got the following error. > > I think as the servers are started in processes forked by the 'start-all' > script TAF does not have the access to the logs. > > Is there any fix for this issue? > > Can we change the script location in test configuration file? > > - ERROR MSG -- > > INFO: Starting carbon server. > Jan 03, 2017 12:08:15 PM org.wso2.carbon.automation.ext > ensions.servers.carbonserver.CarbonServerExtension handleException > SEVERE: Fail to start carbon server > java.lang.RuntimeException: Port 9763 is not open > at org.wso2.carbon.automation.extensions.servers.utils.ClientCo > nnectionUtil.waitForPort(ClientConnectionUtil.java:248) > at org.wso2.carbon.automation.extensions.servers.carbonserver.C > arbonServerManager.startServerUsingCarbonHome(CarbonServerMa > nager.java:120) > at org.wso2.carbon.automation.extensions.servers.carbonserver.T > estServerManager.startServer(TestServerManager.java:116) > at org.wso2.carbon.automation.extensions.servers.carbonserver.C > arbonServerExtension.onExecutionStart(CarbonServerExtension.java:50) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce > ssorImpl.java:62) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe > thodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at org.wso2.carbon.automation.engine.extensions.TestNGExtension > Executor.executeExtensible(TestNGExtensionExecutor.java:75) > at org.wso2.carbon.automation.engine.testlisteners.TestExecutio > nListener.onExecutionStart(TestExecutionListener.java:47) > at org.testng.TestNG.runExecutionListeners(TestNG.java:1068) > at org.testng.TestNG.run(TestNG.java:1015) > at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGEx > ecutor.java:295) > at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute( > TestNGXmlTestSuite.java:84) > at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestN > GProvider.java:90) > at org.apache.maven.surefire.booter.ForkedBooter.invokeProvider > InSameClassLoader(ForkedBooter.java:203) > at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInPro > cess(ForkedBooter.java:155) > at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBoo > ter.java:103) > > Jan 03, 2017 12:08:15 PM org.wso2.carbon.automation.eng > ine.testlisteners.TestExecutionListener handleException > SEVERE: Execution error occurred in TestExecutionListener:- > java.lang.reflect.InvocationTargetException > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce > ssorImpl.java:62) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe > thodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at org.wso2.carbon.automation.engine.extensions.TestNGExtension > Executor.executeExtensible(TestNGExtensionExecutor.java:75) > at org.wso2.carbon.automation.engine.testlisteners.TestExecutio > nListener.onExecutionStart(TestExecutionListener.java:47) > at org.testng.TestNG.runExecutionListeners(TestNG.java:1068) > at org.testng.TestNG.run(TestNG.java:1015) > at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGEx > ecutor.java:295) > at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute( > TestNGXmlTestSuite.java:84) > at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestN > GProvider.java:90) > at org.apache.maven.surefire.booter.ForkedBooter.invokeProvider > InSameClassLoader(ForkedBooter.java:203) > at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInPro > cess(ForkedBooter.java:155) > at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBoo > ter.java:103) > Caused by: java.lang.RuntimeException: Fail to start carbon server > at org.wso2.carbon.automation.extensions.servers.carbonserver.C > arbonServerExtension.handleException(CarbonServerExtension.java:70) > at org.wso2.carbon.automation.extensions.servers.carbonserver.C > arbonServerExtension.onExecutionStart(CarbonServerExtension.java:54) > ...