* feat(resource manager): extend s3 to the storage of ds 1.fix some spell question 2.extend the type of storage 3.add the s3utils to manager resource 4.automatic inject the storage in addition to your config * fix(resource manager): update the dependency * fix(resource manager): extend s3 to the storage of ds fix the constant of hadooputils * fix(resource manager): extend s3 to the storage of ds 1.fix some spell question 2.delete the import * * fix(resource manager): merge the unitTest: 1.TenantServiceImpl 2.ResourceServiceImpl 3.UserServiceImpl * fix(resource manager): extend s3 to the storage of ds merge the resourceServiceTest * fix(resource manager): test cancel the test method createTenant verifyTenant * fix(resource manager): merge the code follow the check-result of sonar * fix(resource manager): extend s3 to the storage of ds fit the spell question * fix(resource manager): extend s3 to the storage of ds revert the common.properties * fix(resource manager): extend s3 to the storage of ds update the storageConfig with None * fix(resource manager): extend s3 to the storage of ds fix the judge of resourceType * fix(resource manager): extend s3 to the storage of ds undo the compile-mysql * fix(resource manager): extend s3 to the storage of ds delete hadoop aws * fix(resource manager): extend s3 to the storage of ds update the know-dependencies to delete aws 1.7.4 update the e2e file-manager common.properties * fix(resource manager): extend s3 to the storage of ds update the aws-region * fix(resource manager): extend s3 to the storage of ds fix the storageconfig init * fix(resource manager): update e2e docker-compose update e2e docker-compose * fix(resource manager): extend s3 to the storage of ds revent the e2e common.proprites print the resource type in propertyUtil * fix(resource manager): extend s3 to the storage of ds 1.println the properties * fix(resource manager): println the s3 info * fix(resource manager): extend s3 to the storage of ds delete the info and upgrade the s3 info to e2e * fix(resource manager): extend s3 to the storage of ds add the bucket init * fix(resource manager): extend s3 to the storage of ds 1.fix some spell question 2.delete the import * * fix(resource manager): extend s3 to the storage of ds upgrade the s3 endpoint * fix(resource manager): withPathStyleAccessEnabled(true) * fix(resource manager): extend s3 to the storage of ds 1.fix some spell question 2.delete the import * * fix(resource manager): upgrade the s3client builder * fix(resource manager): correct the s3 point to s3client * fix(resource manager): update the constant BUCKET_NAME * fix(resource manager): e2e s3 endpoint -> s3:9000 * fix(resource manager): extend s3 to the storage of ds 1.fix some spell question 2.delete the import * * style(resource manager): add info to createBucket * style(resource manager): debug the log * ci(resource manager): test test s3 * ci(ci): add INSERT INTO dolphinscheduler.t_ds_tenant (id, tenant_code, description, queue_id, create_time, update_time) VALUES(1, 'root', NULL, 1, NULL, NULL); to h2.sql * fix(resource manager): update the h2 sql * fix(resource manager): solve to delete the tenant * style(resource manager): merge the style end delete the unuse s3 config * fix(resource manager): extend s3 to the storage of ds UPDATE the rename resources when s3 * fix(resource manager): extend s3 to the storage of ds 1.fix the code style of QuartzImpl * fix(resource manager): extend s3 to the storage of ds 1.impoort restore_type to CommonUtils * fix(resource manager): update the work thread * fix(resource manager): update the baseTaskProcessor * fix(resource manager): upgrade dolphinscheduler-standalone-server.xml * fix(resource manager): add user Info to dolphinscheduler_h2.sql * fix(resource manager): merge the resourceType to NONE * style(upgrade the log level to info): * fix(resource manager): sysnc the h2.sql * fix(resource manager): update the merge the user tenant * fix(resource manager): merge the resourcesServiceImpl * fix(resource manager): when the storage is s3 ,that the directory can't be renamed * fix(resource manager): in s3 ,the directory cannot be renamed * fix(resource manager): delete the deleteRenameDirectory in E2E * fix(resource manager): check the style and recoverd the test * fix(resource manager): delete the log.print(LoginUser) |
||
|---|---|---|
| .. | ||
| dolphinscheduler-e2e-case | ||
| dolphinscheduler-e2e-core | ||
| README.md | ||
| lombok.config | ||
| pom.xml | ||
README.md
DolphinScheduler End-to-End Test
Page Object Model
DolphinScheduler End-to-End test respects the Page Object Model (POM) design pattern. Every page of DolphinScheduler is abstracted into a class for better maintainability.
Example
The login page is abstracted
as LoginPage, with the
following fields,
public final class LoginPage {
@FindBy(id = "inputUsername")
private WebElement inputUsername;
@FindBy(id = "inputPassword")
private WebElement inputPassword;
@FindBy(id = "btnLogin")
private WebElement buttonLogin;
}
where inputUsername, inputPassword and buttonLogin are the main elements on UI that we are interested in. They are
annotated with FindBy so that the test framework knows how to locate the elements on UI. You can locate the elements
by id, className, css selector, tagName, or even xpath, please refer
to the JavaDoc.
Note: for better maintainability, it's essential to add some convenient id or class on UI for the wanted
elements if needed, avoid using too complex xpath selector or css selector that is not maintainable when UI have
styles changes.
With those fields declared, we should also initialize them with a web driver. Here we pass the web driver into the
constructor and invoke PageFactory.initElements to initialize those fields,
public final class LoginPage {
// ...
public LoginPage(RemoteWebDriver driver) {
this.driver = driver;
PageFactory.initElements(driver, this);
}
}
then, all those UI elements are properly filled in.
Test Environment Setup
DolphinScheduler End-to-End test uses testcontainers to set up the testing environment, with docker compose.
Typically, every test case needs one or more docker-compose.yaml files to set up all needed components, and expose the
DolphinScheduler UI port for testing. You can use @DolphinScheduler(composeFiles = "") and pass
the docker-compose.yaml files to automatically set up the environment in the test class.
@DolphinScheduler(composeFiles = "docker/tenant/docker-compose.yaml")
class TenantE2ETest {
}
You can get the web driver that is ready for testing in the class by adding a field of type RemoteWebDriver, which
will be automatically injected via the testing framework.
@DolphinScheduler(composeFiles = "docker/tenant/docker-compose.yaml")
class TenantE2ETest {
private RemoteWebDriver browser;
}
Then the field browser can be used in the test methods.
@DolphinScheduler(composeFiles = "docker/tenant/docker-compose.yaml")
class TenantE2ETest {
private RemoteWebDriver browser;
@Test
void testLogin() {
final LoginPage page = new LoginPage(browser); // <<-- use the browser injected
}
}
Notes
- For UI tests, it's common that the pages might need some time to load, or the operations might need some time to
complete, we can use
await().untilAsserted(() -> {})to wait for the assertions.