How to overcome Could not find or load main class org.testng.TestNG in Jenkins? - linux

I am using selenium 2.47.1 & TestNG for automation process. I'm using Jenkins for continuous integration. Jenkins is installed in Linux server. Jenkins workspace directory is given below : /home/probe7qa/probe7qa.svn/icoreemrtests/onc2014/170.314.a.9/src/eNotes
I have stored lib files in another location. lib files are stored in following path /home/probe7qa/probe7qa.svn/icoreemrtests/onc2014/170.314.a.9/lib
I am using following Shell Command to run Job
java -cp /home/probe7qa/probe7qa.svn/icoreemrtests/onc2014/170.314.a.9/lib/*:/home/probe7qa/probe7qa.svn/icoreemrtests/onc2014/170.314.a.9/src/eNotes/bin org.testng.TestNG testng.xml
Whenever I am trying above Shell Command to run Jenkins job, I'm getting following error [TestNG] [ERROR]
Cannot instantiate class eNotes.ENotes
How to solve this problem...?

Related

Differences between databricks dbx execute and launch command

I have a project for which I want to be able to run some entry points on databricks. I used dbx for that, having the following deployment.yaml file:
build:
python: "poetry"
environments:
default:
workflows:
- name: "test"
existing_cluster_id: "my-culster-id"
spark_python_task:
python_file: "file://tests/test.py"
I'm able to run the test script with the execute command:
poetry run dbx execute --cluster-id=my-culster-id test
My problem with this option is that it launches the script interactively and I can't really retrieve the executed code on Databricks, except by looking at the cluster's logs.
So I tried using the deploy and launch commands, such that a proper job is created and run on Databricks.
poetry run dbx deploy test && poetry run dbx launch test
However the job run fails with the following error, which I don't understand:
Run result unavailable: job failed with error message
Library installation failed for library due to user error. Error messages:
'Manage' permissions are required to modify libraries on a cluster
In any case, what do you think is the best way to run a job that can be traced on Databricks from my local machine ?
I've recently added a documentation section on the differences of execute and launch, would that be something that answers your question?

Run spark from source code on Windows - no such file or directory error

I would like to run Spark from source code on my Windows machine. I did the following steps:
git clone https://github.com/apache/spark
Added the SPARK_HOME variable into the user variables.
Added %SPARK_HOME%\bin to the PATH variable.
./build/mvn -DskipTests clean package
./bin/spark-shell
The last command returns the following error:
What should I do to fix the error?
First, refer to the link below for the solution. The top voted answer gave me the working script for this problem.
: Failed to start master for Spark in Windows
The reason is that spark launch scripts do not support Windows. The spark documentation (https://spark.apache.org/docs/1.2.0/spark-standalone.html) insists you to start the master and workers manually if you are a Windows user. So you need to first run the master and then run spark-shell.

Jenkins with linux machine for selenium script

I have created selenium testng.xml file and make windows batch file for my local window machine and Jenkins build now function perfectly working
But now client expectation is run jenkins projects for same selenium script in Linux server machine.
I m not aware about how can i start for my testng file for linux server?
You created batch file while working with testng.xml on Windows. You would create an equivalent shell file while working with testng.xml on Linux.
Once done, Go to Jenkins Job configuration build section and select Execute Shell option.
Put you shell script in command window or execute shell file directly from command window itself.
To execute shell file, use below syntax:
./<file>

Bash file is running fine in windows for testng but it is not working in linux/mac

My bash file is running fine in windows but it is not working in linux/mac.
I have created a selenium project with testng and I want to create a bash file so I can run my project without IDE
I have searched but till not getting any solution for same
Error on terminal:-
>bash TestNg_RunMe.bat
>Error: Could not find or load main class ..src.lib.selenium-java-2.46.0.jar
>TestNg_RunMe.bat: line 1: ./bin: Is a directory
Note:- I have use bash command also to run the command in linux and mac
Also lib and bin directory is present in right place(As it working fine in windows)
My bash file is :-
java -cp ./src/lib/*;./bin org.testng.TestNG testng.xml
Above bash is working perfect for windows
I have also tried with full absolute path
I have also extract testng.jar and add it in bash file
but nothing work.
Paths are separated using : under Unix-like systems and not ; as in Windows:
java -cp ./src/lib/*:./bin org.testng.TestNG testng.xml
If you are using bash under Windows then changing to : should work everywhere.
The ; character means end of statement to a Unix shell, so what you are attempting to exceute is:
java -cp ./src/lib/*
./bin org.testng.TestNG testng.xml

Running a groovy script in neo4j shell using gsh gives "java.lang.ClassNotFoundException: groovy.lang.Binding"

Running a groovy script in neo4j shell using gsh gives "java.lang.ClassNotFoundException: groovy.lang.Binding".
Even a simple script command like gsh --test
with the following file in the GSP_PATH fails:
test.groovy:
println "test!"
What are the steps to solve this?
The groovy dependency is missing:
Just copy the groovy jar into your lib directory
cp /Users/mh/Downloads/groovy-2.3.7/embeddable/groovy-all-2.3.7.jar path/to/neo4j-community-2.1.5/lib/

Resources