java - How to run testng test cases in UNIX/LINUX environment -


I'm new to automation testing and Testng framework. I am developing my test cases in Java and in the Windows environment. I want to run these developed test cases in the Unix / Linux environment. Anyone can help me step by step in this process. Thanks a lot

@Peter LowryI have me pom.xml below that I have Unix

  {& lt; Project xmlns = "http://maven.apache.org/POM/4.0.0" xmlns: xsi = "http://www.w3.org/2001/ XMLSchema-Example" xsi: schemaLocation = "http: // Maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> & Lt; ModelVersion & gt; 4.0.0 & lt; / ModelVersion & gt; & Lt; Group & gt; ProjTestAutomation & lt; / Group & gt; & Lt; ArtifactId & gt; ProjTestAutomation2 & lt; / ArtifactId> & Lt; Version & gt; 0.0.1-snapshot and lt; / Edition & gt; & Lt; Name & gt; ProjTestAutomation & lt; / Name & gt; & Lt; Description & gt; ProjTestAutomation & lt; / Description & gt; & Lt; Construction & gt; & Lt; SourceDirectory & gt; Src & lt; / SourceDirectory & gt; & Lt; Resources & gt; & Lt; Resources & gt; & Lt; Directory & gt; Src & lt; / Directory & gt; & Lt; Exclude & gt; & Lt; Out to & gt; ** / * Java & lt; / Exclude & gt; & Lt; / Not included & gt; & Lt; / Resources & gt; & Lt; / Resources & gt; & Lt; Plugins & gt; & Lt; Plugin & gt; & Lt; ArtifactId & gt; Maven-compliant plugin & lt; / ArtifactId> & Lt; Version & gt; 3.1 & lt; / Edition & gt; & Lt; Configuration & gt; & Lt; Source & gt; 1.7 & lt; / Source & gt; & Lt; Goal & gt; 1.7 & lt; / Target & gt; & Lt; / Configuration & gt; & Lt; / Plugin & gt; & Lt; Plugin & gt; & Lt; Group & gt; Org.apache.maven.plugins & lt; / Group & gt; & Lt; ArtifactId & gt; Maven- Perfect-plugin & lt; / ArtifactId> & Lt; Version & gt; 2.17 & lt; / Edition & gt; & Lt; Configuration & gt; & Lt ;! - Summary the xml file to consider for test execution - & gt; & Lt; SuiteXmlFiles & gt; & Lt; SuiteXmlFile & gt; Testng.xml & lt; / SuiteXmlFile & gt; & Lt; / SuiteXmlFiles & gt; & Lt; / Configuration & gt; & Lt; / Plugin & gt; & Lt; / Plugins & gt; & Lt; / Create & gt; & Lt; Dependency & gt; & Lt; Dependency & gt; & Lt; Group & gt; ProjestAutomation & lt; / Group & gt; & Lt; ArtifactId & gt; ProjTestAutomation2 & lt; / ArtifactId> & Lt; Version & gt; 0.0.1-snapshot and lt; / Edition & gt; & Lt; / Dependencies & gt; & Lt; Dependency & gt; & Lt; Group & gt; Org.testng & lt; / Group & gt; & Lt; ArtifactId & gt; TestNG & lt; / ArtifactId> & Lt; Version & gt; 6.8.7 & lt; / Edition & gt; & Lt; / Dependencies & gt; & Lt; Dependency & gt; & Lt; Group & gt; Org.apache.logging.log4j & lt; / Group & gt; & Lt; ArtifactId & gt; Log4j-api & lt; / ArtifactId> & Lt; Version & gt; 2.0.2 & lt; / Edition & gt; & Lt; / Dependencies & gt; & Lt; Dependency & gt; & Lt; Group & gt; Org.apache.logging.log4j & lt; / Group & gt; & Lt; ArtifactId & gt; Log4j core & lt; / ArtifactId> & Lt; Version & gt; 2.0.2 & lt; / Edition & gt; & Lt; / Dependencies & gt; & Lt; / Dependencies & gt; & Lt; / Project & gt; }   

but I'm getting an error [Error] Target org.apache.maven.plugins failed to execute: maven-surefire-plugin: 2.17: test on project MDFSureManager (default) -Testing): Target org.apache.maven.plugins execution Default-test: maven-surefire-plugin: 2.17: Exam failed: an error occurred in the forkid process [ERROR] org.testng.TestNGException: [ERROR] In class Classpath: Test Controller Resource

As Peter Lawer You have mentioned, using a Java build system.

Possible options:

  • - Very flexible, uses Groovy language for configuration
  • - XML ​​declarative configuration, tons of plugin
  • I personally used a standalone ant (pain) Never seen anywhere else than Samwen. >



Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -