Question

1
Replies
45
Views
AmanG851 Member since 2020 1 post
Exavalu
Posted: 4 months ago
Last activity: 4 months 1 week ago

CI CD implementation of PEGA Selenium Starter Kit

Hi

I am tring to run the starter kit from jenkins hosted in AWS (LINUX System), when i am running the test over selenium grid I am getting an error:

Error injecting constructor, java.lang.NullPointerException
  at com.pega.CRMTestEnvironment.<init>(CRMTestEnvironment.java:40)
  at com.pega.CRMTestEnvironment.class(CRMTestEnvironment.java:40)
  while locating com.pega.CRMTestEnvironment
1 error
	at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:987)
	at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1013)
	at cucumber.runtime.java.guice.impl.GuiceFactory.getInstance(GuiceFactory.java:42)
	at cucumber.runtime.java.JavaHookDefinition.execute(JavaHookDefinition.java:60)
	at cucumber.runner.HookDefinitionMatch.runStep(HookDefinitionMatch.java:16)
	at cucumber.runner.TestStep.executeStep(TestStep.java:65)
	at cucumber.runner.TestStep.run(TestStep.java:50)
	at cucumber.runner.TestCase.run(TestCase.java:42)
	at cucumber.runner.Runner.runPickle(Runner.java:50)
	at cucumber.api.testng.TestNGCucumberRunner.runScenario(TestNGCucumberRunner.java:58)
	at cucumber.api.testng.AbstractTestNGCucumberTests.runScenario(AbstractTestNGCucumberTests.java:22)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
	at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
	at org.testng.internal.TestMethodWithDataProviderMethodWorker.call(TestMethodWithDataProviderMethodWorker.java:73)
	at org.testng.internal.TestMethodWithDataProviderMethodWorker.call(TestMethodWithDataProviderMethodWorker.java:14)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
	at com.pega.framework.MouseImpl.mouseMove(MouseImpl.java:184)
	at com.pega.framework.MouseImpl.moveTo(MouseImpl.java:204)
	at com.pega.TestEnvironmentImpl.initializeMouse(TestEnvironmentImpl.java:231)
	at com.pega.TestEnvironmentImpl.initializeEnvironment(TestEnvironmentImpl.java:148)
	at com.pega.TestEnvironmentImpl.initializeEnvironment(TestEnvironmentImpl.java:124)
	at com.pega.TestEnvironmentImpl.<init>(TestEnvironmentImpl.java:81)
	at com.pega.config.test.TestBase.<init>(TestBase.java:39)
	at com.pega.CRMTestEnvironment.<init>(CRMTestEnvironment.java:40)
	at com.pega.CRMTestEnvironment$$FastClassByGuice$$94f95dd5.newInstance(<generated>)
	at com.google.inject.internal.cglib.reflect.$FastConstructor.newInstance(FastConstructor.java:40)
	at com.google.inject.internal.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:60)
	at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85)
	at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:254)
	at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1031)
	at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
	at cucumber.runtime.java.guice.impl.SequentialScenarioScope$1.get(SequentialScenarioScope.java:40)
	at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
	at com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:978)
	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1024)
	at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:974)
	... 25 more

I have tried this with Sauselabs too i am facing the same issue 

This is proably due to initializeMouse(TestEnvironmentImpl.java:231) this is calling the robot class which wont work in LInux environment. Any configuration suggestion would help.

Pega Automated Unit Testing DevOps
Share this page LinkedIn