You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: integration-tests/README.md
+17-19Lines changed: 17 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,18 +1,18 @@
1
-
# Integration Tests for Operator
1
+
# Integration Tests for Oracle WebLogic Server Kubernetes Operator
2
2
3
-
This documentation describes the functional use cases that are covered in integration testing for Weblogic Operator. The tests are written in java(Junit tests) and driven by maven profile. All the use cases covered in run.sh will be covered in java integration tests. Currently, QUICKTEST use cases and some of non-quick test(till domain4) use cases are covered in java tests.
3
+
This documentation describes the functional use cases that are covered in integration testing for he Oracle WebLogic Server Kubernetes Operator. The tests are written in Java (JUnit tests) and driven by Maven profile. All the use cases covered in run.sh will be covered in Java integration tests. Currently, QUICKTEST use cases and some of Full test(till domain4) use cases are covered in Java tests.
4
4
5
5
# Environments
6
6
7
-
The tests currently runs in three modes, "Wercker", "Jenkins", and "standalone" Oracle Linux, where the mode is controlled by the WERCKER and JENKINS environment variables described below. The default is "standalone".
7
+
The tests currently run in three modes: "Wercker", "Jenkins", and "standalone" Oracle Linux, where the mode is controlled by the WERCKER and JENKINS environment variables described below. The default is "standalone".
8
8
9
9
* "Standalone" Oracle Linux, i.e, run the tests manually with mvn command.
10
10
* Wercker - https://app.wercker.com/Oracle/weblogic-kubernetes-operator/runs - integration-test-java is the pipeline name
Currently java integration tests cover all QUICKTEST and some non-QUICKTEST use cases from run.sh. The below are the use cases:
15
+
Currently Java integration tests cover all QUICKTEST and some Full test use cases from run.sh. The below are the use cases:
16
16
17
17
* create operator operator1 which manages default and test1 namespaces, verify its deployed successfully, pod created, operator Ready and verify external REST service if configured
18
18
* create domain domain1 in default namespace and verify the pods, services are created and servers are in Ready
@@ -23,7 +23,7 @@ Currently java integration tests cover all QUICKTEST and some non-QUICKTEST use
23
23
* cluster scale up/down using Operator REST endpoint, webapp load balancing should adjust accordingly. (run.sh does scaling by editing the replicas in domain-custom-resource.yaml.)
24
24
* Operator life cycle(destroy and create) should not impact the running domain
25
25
26
-
Non-quick test use cases
26
+
Full test use cases
27
27
28
28
* keep the first domain and operator running
29
29
* create another domain domain2 in default namespace and verify the domain by doing the checks 2 - 5 listed in quick test
@@ -43,14 +43,12 @@ Non-quick test use cases
43
43
44
44
# Directory Configuration and Structure
45
45
46
-
java integration tests are in feature/java-integration-tests branch on weblogic-kubernetes-operator project. Merged to develop branch.
47
-
48
46
Directory structure of source code:
49
47
50
-
A new module "integration-tests" is added to the maven project weblogic-kubernetes-operator.
48
+
A new module "integration-tests" is added to the Maven project weblogic-kubernetes-operator.
51
49
52
50
weblogic-kubernetes-operator/integration-tests - location of module pom.xml
53
-
weblogic-kubernetes-operator/integration-tests/src/test/java - integration test(junit) classes and utility classes
51
+
weblogic-kubernetes-operator/integration-tests/src/test/java - integration test(JUnit) classes and utility classes
54
52
weblogic-kubernetes-operator/integration-tests/src/test/resources - properties files(see Configuration Files section) and other scripts
55
53
56
54
Directory structure used for the test run:
@@ -88,7 +86,7 @@ Defaults for RESULT_ROOT & PV_ROOT:
88
86
89
87
# Configuration Files
90
88
91
-
A module "integration-tests" is added in maven weblogic-kubernetes-operator project.
89
+
A module "integration-tests" is added in Maven weblogic-kubernetes-operator project.
92
90
93
91
Below configuration files are used:
94
92
```
@@ -101,7 +99,7 @@ maxIterationsPod=50
101
99
waitTimePod=5
102
100
103
101
104
-
src/integration-tests/resources/ITFirstOperator.properties - customized properties for operator. Any property can be provided here from create-weblogic-operator-inputs.yaml, for all the properties that are not defined here default values in create-weblogic-operator-inputs.yaml are used while generating the operator inputs yaml file.
102
+
src/integration-tests/resources/ITFirstOperator.properties - customized properties for Operator. Any property can be provided here from create-weblogic-operator-inputs.yaml, for all the properties that are not defined here default values in create-weblogic-operator-inputs.yaml are used while generating the operator inputs yaml file.
src/integration-tests/resources/ITFirstDomain.properties - customized properties for domain. Any property can be provided here from create-weblogic-domain-inputs.yaml. For all the properties that are not defined here, the default values in create-weblogic-domain-inputs.yaml are used while generating the domain inputs yaml file.
113
+
src/integration-tests/resources/ITFirstDomain.properties - customized properties for WebLogic Domain. Any property can be provided here from create-weblogic-domain-inputs.yaml. For all the properties that are not defined here, the default values in create-weblogic-domain-inputs.yaml are used while generating the domain inputs yaml file.
116
114
117
115
```
118
116
adminServerName= admin-server
@@ -137,8 +135,8 @@ Certain properties like weblogicDomainStoragePath, weblogicOperatorImage, extern
137
135
138
136
# How does it work
139
137
140
-
When the tests are run manually with mvn command on hosted linux, weblogic image and server jre images are pulled from a local repository. Operator image is built with the git branch from where the mvn command is executed.
141
-
All the tests that start with IT*.java are ran. The test builds the operator, runs a series of tests and archives the results into tar.gz files upon completion.
138
+
When the tests are run manually with mvn command on hosted Linux, WebLogic image and server jre images are pulled from a local repository. Operator image is built with the git branch from where the mvn command is executed.
139
+
All the tests that start with IT*.java are run. The test builds the operator, runs a series of tests and archives the results into tar.gz files upon completion.
@@ -273,11 +271,11 @@ java.lang.RuntimeException: FAILURE: testwebapp did not return 200 status code,
273
271
[ERROR] Please refer to dump files (if any exist) [date]-jvmRun[N].dump, [date].dumpstream and [date]-jvmRun[N].dumpstream
274
272
275
273
```
276
-
Junit test results can be seen at "integration-tests/target/failsafe-reports/TEST-oracle.kubernetes.operator.ITSingleDomain.xml". This file shows how much time each test case took to run and the failed test results if any.
274
+
JUnit test results can be seen at "integration-tests/target/failsafe-reports/TEST-oracle.kubernetes.operator.ITSingleDomain.xml". This file shows how much time each test case took to run and the failed test results if any.
277
275
278
276
# Logging/Archiving
279
277
280
-
java utils logging is used, writes all the messages to console and java_test_suite.out in $RESULT_ROOT/acceptance_test_tmp directory.
278
+
Java utils logging is used, writes all the messages to console and java_test_suite.out in $RESULT_ROOT/acceptance_test_tmp directory.
281
279
At the end of the test run, all pods logs, describes are logged in individual files and are written to state-dump-logs directory in $RESULT_ROOT/acceptance_test_tmp.
282
280
283
281
$RESULT_ROOT/acceptance_test_tmp is archived under $RESULT_ROOT/acceptance_test_tmp_archive
@@ -286,12 +284,12 @@ $PV_ROOT/acceptance_test_pv is archived under $PV_ROOT/acceptance_test_pv_archiv
286
284
287
285
# How to add a new test
288
286
289
-
Add a new Junit test under integration-tests/src/test/java/oracle/kubernetes/operator.
287
+
Add a new JUnit test under integration-tests/src/test/java/oracle/kubernetes/operator.
290
288
291
289
class name must start with IT(Integration Test), IT*.java
292
290
293
291
ITFirstDomain.java - take a look at this test for reference
0 commit comments