Giter VIP home page Giter VIP logo

atm's Introduction

atm

jitpack java

automation test management

Useage

Add the following dependency to your pom.xml:

<dependency>
	<groupId>com.github.herowzz</groupId>
	<artifactId>atm</artifactId>
	<version>v0.1.2.RELEASE</version>
</dependency>

the config.properties

product=WINFORM-TEST
version=1.0.0
runPath=C:\\WINDOWS\\system32\\notepad.exe
driverUrl=http://127.0.0.1:4723
outputPath=F:\\temp
  • runPath: is the application you want to test, in the web test you can write the web app start url
  • driverUrl: in winform app test you must write the Windows Application Driver url in here
  • outputPath: output result file path

then you can run main class

@Configuration(packages = "com.github.herowzz.test.winform.useCase", driverType = DriverType.WinForm)
public class TestStart {

	private static Logger log = LoggerFactory.getLogger(TestStart.class);

	public static void main(String[] args) throws Exception {
		log.info("TestStart begin...");
		TestApplication.run(TestStart.class);
		log.info("TestStart finished...");
		System.exit(1);
	}
}

Configuration

Annotation Configuration use packages and driverType param

  • packages: you write test use case must in this package for parent package
  • driverType: now support Web and Winform

Test UseCase Class

Test UseCase Class use TestModule, DriverInject, UseCase annotation

@TestModule(name = "login", order = 1)
public class LoginModule {

	private static Logger log = LoggerFactory.getLogger(LoginModule.class);

	@DriverInject
	public WindowsDriver<WindowsElement> driver;

	@UseCase(name = "test Version code", order = 1)
	public CaseResult testVersion() {
		CaseResult result = new CaseResult();
		log.info("driver=========================" + driver);
		RemoteWebElement editInput = driver.findElementByClassName("Edit");
		editInput.clear();
		editInput.sendKeys("This is some text");
		editInput.sendKeys(Keys.ENTER);
		editInput.sendKeys(Keys.ENTER);
		return result.ok();
	}
}
  • TestModule: have name and order param
  • DriverInject: to inject the driver for selenium
  • UseCase: have name and order param

Run start

Finally you run main class then system can execute the all case you write and export the result file

atm's People

Contributors

dyf0705 avatar herowzz avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

dyf0705

atm's Issues

优化异常抛出

目前发生异常时,无法查看具体触发异常的具体位置
需要可直观的查看具体哪个地方触发的异常

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.