I wrote a TestRails.java class with a main method that uses TestRails JAVA API Binding classes. I’m trying to compile and run it in the Jenkins build shell section. Is this not the way I’m suppose to integrate Jenkins with TestRails? I'm new to coding and this is first time writing code to interact with an api. I appreciate advice from other more experienced coders and testers.
I’m getting main method not found when running TestRails java file with a main method in command line that depends on TestRails Java API Binding classes without a main method. How do I fix this? I can’t change APIClient.java and APIException.java since those are not suppose to have a main methods.
I'm new to coding and this is first time writing code to interact with an api. I appreciate advice from other more experienced coders and testers.
java -cp ../../../ com.gurock.testrail.APIClient -cp ../../../ com.gurock.testrail.APIException -cp ../../../ com.gurock.testrail.TestRails BeforeRun /Users/abc/.jenkins/workspace/IOSPredeploy/AppiumTest/src/test/java/com/gurock/testrail/input_test_rail.xml 20190314
Error: Main method not found in class com.gurock.testrail.APIClient, please define the main method as: public static void main(String args) or a JavaFX application class must extend javafx.application.Application