Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add WebAppFixture #153

Merged
merged 1 commit into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# Eclipse
.settings/

# Java
.class

Expand Down
3 changes: 3 additions & 0 deletions .ivy/raise-build-plugin-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

mvn --batch-mode versions:set-property versions:commit -Dproperty=project.build.plugin.version -DnewVersion=${2} -DallowSnapshots=true
4 changes: 4 additions & 0 deletions .ivy/raise-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

mvn -B versions:set -DnewVersion=${1} -DprocessAllModules
mvn -B versions:commit -DprocessAllModules
13 changes: 9 additions & 4 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ pipeline {
cron '@midnight'
}

parameters {
string(name: 'engineSource', defaultValue: 'https://product.ivyteam.io', description: 'Engine page url')
}

stages {
stage('build') {
steps {
Expand All @@ -22,11 +26,12 @@ pipeline {
docker.build('maven').inside("--network ${networkName}") {
withCredentials([string(credentialsId: 'gpg.password.axonivy', variable: 'GPG_PWD'), file(credentialsId: 'gpg.keystore.axonivy', variable: 'GPG_FILE')]) {
sh "gpg --batch --import ${env.GPG_FILE}"
def phase = isReleaseOrMasterBranch() ? 'deploy' : 'verify'
maven cmd: "clean ${phase} " +
def phase = isReleaseOrMasterBranch() ? 'deploy' : 'verify'
maven cmd: "clean ${phase} " +
"-Dmaven.test.failure.ignore=true " +
"-Dengine.page.url=${params.engineSource} " +
"-Dskip.gpg=false " +
"-Dgpg.passphrase='${env.GPG_PWD}' " +
"-Dgpg.passphrase='${env.GPG_PWD}' " +
"-Dselenide.remote=http://${seleniumName}:4444/wd/hub "
}
}
Expand All @@ -36,7 +41,7 @@ pipeline {
}
}
archiveArtifacts '**/target/*.jar'
junit '**/target/surefire-reports/**/*.xml'
junit testDataPublishers: [[$class: 'StabilityTestDataPublisher']], testResults: '**/target/*-reports/**/*.xml'
recordIssues tools: [mavenConsole(), eclipse(), javaDoc()], unstableTotalAll: 1, filters: [
excludeMessage('.*JAR will be empty.*'), // for unit tester
]
Expand Down
6 changes: 5 additions & 1 deletion build/release/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ pipeline {
buildDiscarder(logRotator(numToKeepStr: '30', artifactNumToKeepStr: '20'))
}

parameters {
string(name: 'engineSource', defaultValue: 'https://product.ivyteam.io', description: 'Engine page url')
}

stages {
stage('build') {
when {
Expand All @@ -21,7 +25,7 @@ pipeline {
withCredentials([string(credentialsId: 'gpg.password.axonivy', variable: 'GPG_PWD'), file(credentialsId: 'gpg.keystore.axonivy', variable: 'GPG_FILE')]) {
sh "gpg --batch --import ${env.GPG_FILE}"
def dryRun = isReleaseBranch() ? '' : '-DdryRun=true'
def args = "-Dmaven.test.skip=true -Dskip.gpg=false -Dgpg.passphrase='${env.GPG_PWD}'";
def args = "-Dmaven.test.skip=true -Dengine.page.url=${params.engineSource} -Dskip.gpg=false -Dgpg.passphrase='${env.GPG_PWD}'";
maven cmd: '--batch-mode ' + dryRun + ' -Darguments="' + args + '" -DpushChanges=false -DlocalCheckout=true release:prepare release:perform'
}

Expand Down
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<module>primeui-tester</module>
<module>web-tester</module>
<module>web-tester-product</module>
<module>web-tester-fixture</module>
<module>unit-tester</module>
</modules>

Expand Down
27 changes: 27 additions & 0 deletions unit-tester/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
23 changes: 23 additions & 0 deletions unit-tester/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>unit-tester</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>
35 changes: 35 additions & 0 deletions web-tester-fixture/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src">
<attributes>
<attribute name="optional" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="src_wsproc">
<attributes>
<attribute name="optional" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="src_dataClasses">
<attributes>
<attribute name="optional" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry exported="true" kind="con" path="IVY_CONTAINER"/>
<classpathentry kind="con" path="WEBAPP_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
<classpathentry kind="src" output="target/test-classes" path="src_test">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
19 changes: 19 additions & 0 deletions web-tester-fixture/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# general
Thumbs.db
.DS_Store
*~
*.log

# java
*.class
hs_err_pid*

# maven
target/
lib/mvn-deps/

# ivy
classes/
src_dataClasses/
src_wsproc/
logs/
49 changes: 49 additions & 0 deletions web-tester-fixture/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>web-tester-fixture</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>ch.ivyteam.ivy.designer.dataClasses.ui.ivyDataClassBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>ch.ivyteam.ivy.designer.process.ui.ivyWebServiceProcessClassBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>ch.ivyteam.ivy.designer.ide.ivyModelValidationBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>ch.ivyteam.ivy.project.IvyProjectNature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.jem.beaninfo.BeanInfoNature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
</natures>
</projectDescription>
12 changes: 12 additions & 0 deletions web-tester-fixture/.settings/.jsdtscope
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry excluding="**/bower_components/*|**/node_modules/*|**/*.min.js" kind="src" path="webContent"/>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
<attributes>
<attribute name="hide" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
<classpathentry kind="output" path=""/>
</classpath>
5 changes: 5 additions & 0 deletions web-tester-fixture/.settings/ch.ivyteam.ivy.designer.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
ch.ivyteam.ivy.designer.preferences.DataClassPreferencePage\:DEFAULT_DATA_CLASS=com.axonivy.demo.test.Data
ch.ivyteam.ivy.designer.preferences.DataClassPreferencePage\:DEFAULT_NAMESPACE=com.axonivy.demo.test
ch.ivyteam.ivy.project.preferences\:PRIMEFACES_VERSION=11
ch.ivyteam.ivy.project.preferences\:PROJECT_VERSION=112000
eclipse.preferences.version=1
10 changes: 10 additions & 0 deletions web-tester-fixture/.settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=17
10 changes: 10 additions & 0 deletions web-tester-fixture/.settings/org.eclipse.wst.common.component
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="workflow-demosTest">
<wb-resource deploy-path="/" source-path="/webContent" tag="defaultRootSource"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src_wsproc"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src_dataClasses"/>
<property name="context-root" value="workflow-demosTest"/>
<property name="java-output-path" value="/workflow-demosTest/target/classes"/>
</wb-module>
</project-modules>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<root>
<facet id="jst.jsf">
<node name="libprov">
<attribute name="provider-id" value="jsf-user-library-provider"/>
</node>
</facet>
</root>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<fixed facet="wst.jsdt.web"/>
<installed facet="java" version="17"/>
<installed facet="jst.web" version="3.0"/>
<installed facet="wst.jsdt.web" version="1.0"/>
<installed facet="jst.jsf" version="2.1"/>
</faceted-project>
2 changes: 2 additions & 0 deletions web-tester-fixture/.settings/org.eclipse.wst.css.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
css-profile/<project>=org.eclipse.wst.css.core.cssprofile.css3
eclipse.preferences.version=1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
org.eclipse.wst.jsdt.launching.baseBrowserLibrary
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Window
1 change: 1 addition & 0 deletions web-tester-fixture/config/custom-fields.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CustomFields:
2 changes: 2 additions & 0 deletions web-tester-fixture/config/databases.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# yaml-language-server: $schema=https://json-schema.axonivy.com/app/0.0.1/databases.json
Databases:
1 change: 1 addition & 0 deletions web-tester-fixture/config/overrides.any
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
2 changes: 2 additions & 0 deletions web-tester-fixture/config/persistence.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<persistence xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.2" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_2.xsd"/>
2 changes: 2 additions & 0 deletions web-tester-fixture/config/rest-clients.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# yaml-language-server: $schema=https://json-schema.axonivy.com/app/0.0.1/rest-clients.json
RestClients:
4 changes: 4 additions & 0 deletions web-tester-fixture/config/roles.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<role>
<identifier>Everybody</identifier>
</role>
7 changes: 7 additions & 0 deletions web-tester-fixture/config/users.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<userConfig>
<user>
<username>test</username>
<password>test</password>
</user>
</userConfig>
2 changes: 2 additions & 0 deletions web-tester-fixture/config/variables.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Variables:
myVar: init
2 changes: 2 additions & 0 deletions web-tester-fixture/config/webservice-clients.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# yaml-language-server: $schema=https://json-schema.axonivy.com/app/0.0.1/webservice-clients.json
WebServiceClients:
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Data #class
com.axonivy.demo.test #namespace
57 changes: 57 additions & 0 deletions web-tester-fixture/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.axonivy.ivy.webtest</groupId>
<artifactId>web-tester-fixture</artifactId>
<version>11.2.0-SNAPSHOT</version>
<packaging>iar-integration-test</packaging>
<properties>
<project.build.plugin.version>11.2.0-SNAPSHOT</project.build.plugin.version>
<engine.page.url>https://product.ivyteam.io</engine.page.url>
</properties>
<dependencies>
<dependency>
<groupId>com.axonivy.ivy.webtest</groupId>
<artifactId>web-tester</artifactId>
<version>11.2.0-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
<testSourceDirectory>src_test</testSourceDirectory>
<testOutputDirectory>target/test-classes</testOutputDirectory>
<plugins>
<plugin>
<groupId>com.axonivy.ivy.ci</groupId>
<artifactId>project-build-plugin</artifactId>
<version>11.2.0-SNAPSHOT</version>
<extensions>true</extensions>
<configuration>
<ivyVersion>[11.1.0,12.0.0)</ivyVersion>
<engineListPageUrl>${engine.page.url}</engineListPageUrl>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
<pluginRepositories>
<!-- Used to install project-build-plugin -->
<pluginRepository>
<id>central.snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<updatePolicy>always</updatePolicy>
</snapshots>
</pluginRepository>
</pluginRepositories>
</project>
Loading
Loading