Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/herowzz/atm
automation test lib base selenium, support web and winform case
https://github.com/herowzz/atm
java selenium testcases web-test winform-test
Last synced: 14 days ago
JSON representation
automation test lib base selenium, support web and winform case
- Host: GitHub
- URL: https://github.com/herowzz/atm
- Owner: herowzz
- Created: 2020-02-12T11:10:18.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-01-04T16:38:03.000Z (about 3 years ago)
- Last Synced: 2025-02-01T19:41:34.627Z (14 days ago)
- Topics: java, selenium, testcases, web-test, winform-test
- Language: Java
- Homepage:
- Size: 20 MB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# atm
![jitpack](https://jitpack.io/v/herowzz/atm.svg) ![java](https://img.shields.io/badge/java-1.8.0%2B-green)automation test management
## Useage
Add the following dependency to your pom.xml:
```xmlcom.github.herowzz
atm
v0.1.2.RELEASE```
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 paththen you can run main class
```java
@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
```java
@TestModule(name = "login", order = 1)
public class LoginModule {private static Logger log = LoggerFactory.getLogger(LoginModule.class);
@DriverInject
public WindowsDriver 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