java.lang.NoClassDefFoundError error message when integrating with Selenium/Maven/TestNG project
Hi Team, I have a selenium project developed in Selenium Java, Maven and TestNG framework. The framework is like all the dependencies are in one maven project and all the framework related classes are in another project which is dependent on dependencies project. And my application automation project which is developed in selenium java, maven and testng which is dependent on framework maven project and dependencies project. When I am integrating this with Test Complete, I am able to copy all src folder, testng xml files, pom.xml into test complete project directory and able to compile it and all the classes are in target\classes directory with no errors. and also added all the dependencies into target\dependency folder And i have created UnitTesting item and added TestNG and provided the values as mentioned below. But when I am running the class in test complete, it is compiling successfully but giving me the error as NoClassDefFoundError. I have added the target\classes and dependencies explicitly in Java Bridge also but it is throwing me the same error. Error: FAILED: testscripts.smoke.SmokeTest1.createNewCompanyContactAndOrg java.lang.NoClassDefFoundError: framework/utils/ApplicationLauncher at testscripts.smoke.SmokeTest1.createNewCompanyContactAndOrg(SmokeTest1.java:15) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:569) at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:139) at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:664) at org.testng.internal.invokers.TestInvoker.invokeTestMethod(TestInvoker.java:228) at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:63) at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:961) at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:201) at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:148) at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128) at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) at org.testng.TestRunner.privateRun(TestRunner.java:819) at org.testng.TestRunner.run(TestRunner.java:619) at org.testng.SuiteRunner.runTest(SuiteRunner.java:443) at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:437) at org.testng.SuiteRunner.privateRun(SuiteRunner.java:397) at org.testng.SuiteRunner.run(SuiteRunner.java:336) at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52) at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95) at org.testng.TestNG.runSuitesSequentially(TestNG.java:1301) at org.testng.TestNG.runSuitesLocally(TestNG.java:1228) at org.testng.TestNG.runSuites(TestNG.java:1134) at org.testng.TestNG.run(TestNG.java:1101) at org.testng.TestNG.privateMain(TestNG.java:1461) at org.testng.TestNG.main(TestNG.java:1425) Caused by: java.lang.ClassNotFoundException: framework.utils.ApplicationLauncher at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525) ... 28 more =============================================== Command line test Tests run: 1, Failures: 1, Skips: 0 =============================================== [INFO ] 2024-12-09 14:40:19,918 framework.utils.DriverHelper:128 - Stopping Win app driver [INFO ] 2024-12-09 14:40:19,938 framework.core.FrameworkScript:162 - Quitting driver =============================================== Command line suite Total tests run: 1, Passes: 0, Failures: 1, Skips: 0 =============================================== As per the error it is not able to find the ApplicationLauncher class during run time. But the class file is present in target\classes folder. I have tried recompiling again and again but the result is same. PS: I am able to run the selenium project outside the test complete without any issues.44Views0likes2CommentsQuestion about ReadyAPI test item
Is there any way, either in the GUI of the ReadyAPI test item or a script, to make the path to the ReadyAPI project file (XML) something like Project.ConfigPath + file name.xml.I know you can use this in scripts but I am not sure how to do this in conjunction with the ReadyAPI test item. The issue I am facing is having the file on a network drive is intermittently not working and if I make it a local path (C:\Projects\ReadyAPI), everyone on the team would need the file in that same location and it wouldn't be in source control.36Views0likes6CommentsExecute parallel Test with Selenium Server
I'm new to TestComplete and try to set up a private Selenium Grid server to run parallel test but encounter error as Selenium Server exit. Selenium jar and Java JVM directories have been inputted Can anyone guide me how to integrate Selenium Server30Views0likes3CommentsADO Microsoft-Hosted Agent unable to navigate control
Hello, I am trying to get an ADO pipeline to run a Keyword test, and it is failing to do so. The Keyword test has one enabled step, to navigate to https://www.subzero-wolf.com/ in the Chrome browser. This step functions perfectly when it is run locally on my computer (there's not much that could go wrong). The pipeline has three steps in it: one which installs the Visual Studio Test Platform; one which installs the test runner, in this case I am using TestExecute; and the final VSTest step, which is in charge of running the Keyword Tests. The first two steps succeed just fine, but on the last step the pipeline throws the error that the test was "Unable to navigate to the https://... page" The pipeline agent is an MS-Hosted agent, called 'windows-latest'. I have a feeling that there is something wrong with the environment we are running the test in, but I don't have enough knowledge to determine what should be added or removed. I would be happy to provide you with any further information I can give you about the state of the pipeline. Thank you for your assistance!Solved83Views0likes5CommentsUnable to auto-login to Azure Agent
Hi Community, I am using a self-hosted agent and I am triggering runs through a pipeline. I have setup the auto-logon/ Interactive mode in the agent. I am currently manually logging into the agent and then triggering the pipeline. and then in the pipeline disabling the user session and things are working as expected. My requirement is to auto-login to the Agent so that session would be opened after triggering the pipeline and then disable the user session which i already have in the pipeline.. I've seen in the smartbear tutorial the below info, An interactive user session must be opened on your test agent. You can open the session manually, or, if you use Team Foundation Server 2018 or later, you can configure your agent to run with the auto-logon enabled to open the session automatically when it starts. You enable the auto-logon when you configure your agent. To learn about configuring agents, seedocs.microsoft.com/en-us/azure/devops/pipelines/agents/. Can someone help me with this. Thanks & Regards, Nandini176Views0likes3CommentsAzure batch node DistributedCOM error when running SessionCreator
Hi, I am having an issue with running SessionCreator on Azure. Our automation setup uses Azure Batch to run Tasks on nodes. Each task will run the test project using SessionCreator on the node. The problem we are running in to, is that when the second task runs on a node, at some point the automation will stop running. Looking at our custom logs we can see that just after one of the automated tests runs, a DistributedCOM error occurs: The above issue is happening regularly on the second Task that runs (second run off SessionCreator) on the same node. I am wondering has anyone encountered anything like this before? I am still unsure if this is a SessionCreator issue or an Azure issue. Thanks for any advice!Solved47Views0likes4CommentsUnable to execute Desktop GUI tests on Azure Virtual Machine connected to GitHub Actions runner
Hi everyone, Currently we are migrating to GitHub and as a part of that I am trying to execute a simple GUI desktop test using TestComplete with GitHub actions. The issue: I have created a batch file to launch TestComplete and run the simple GUI test as mention in the documentation provided on TestComplete website. (refer to Syntax screenshot) https://support.smartbear.com/testcomplete/docs/working-with/integration/github-actions.html?_ga=2.246307148.915657396.1707729558-339793958.1707729558 https://support.smartbear.com/testexecute/docs/running/automating/command-line/command-line.html#examples https://community.smartbear.com/discussions/testcomplete-questions/testexecute-command-line/119642 The Batch file which was created using the support documents, works fine when executed manually on the Virtual Machine, it launches TestComplete and executes GUI test and generates report. But when it is executed with GitHub actions, it hangs indefinitely (refer to Admin-mode and GitHub-execution screenshot) and should be cancelled. So I am stuck at this point because debugging is difficult, as there is no specific error message appears during or after the execution. 1.Tried to run the batch file using Admin privileges 2.Checked Firewall setting etc., 3. I have gone through the documentation and questions on the community related to this topic but could not find any solution related to this issue. Has anyone had similar issue ? Thank you.127Views0likes10Comments