2.Revision
History
Version
|
Comments
|
Date
|
Author
|
1.0
1.1
|
Initial Draft for 9.0ee
Modified for 9.1ee commands
|
04/20/05
10/18/06
|
Davis Nguyen
Davis Nguyen
|
Table
of
Content
1.Introduction
2. Revision
History
3.
Existing Commands
4.
New Commands
5.
End-to-End Test Scenario
6. Review
7.
References
1.Introduction
This document provides
a list of procedures to test Admin CLI
Loadbalancer enhancement in AppServer 9.1ee release. For detail test
case execution and configuration, please see section 2, Table of Content.
3.Existing 8.1EE
Commands Test Cases
1.0
create-http-lb-config
1.0 Definition:
The create-http-lb-config command is used
to create a
lb configuration. If --target option is not specified and
config_name
operand is specified, then a load balancer configuration is created but
with
no references to any target. If config_name operand is not
specified and
--target
option is specified, then a load balancer configuration is implicitly
created
with an unique name as
targetName-http-lb-config.
Text
color
in purple is referenced for new properties for
the command
1.1 Usage:
create-http-lb-config
[--responsetimeout 60] [--httpsrouting=false] [--reloadinterval 60]
[--monitor=false] [--routecookie=true]
[--property
(name=value)[:name=value]*]
--target
target | config_name
1.2 Test cases: create-http-lb-config
Basic test (no target)
1. create a lb-config with
only config_name option
specified. Verify if the lb-config was created with all default
assigned values stated in the usage
2. create a lb-config with both required
parameters
target
and config_name
options and verify for appropriate error messages are thrown
3. miss both the required parameters
target and config_name
and verify appropriate error messages are thrown
resposetimeout option
4. create a lb-config
with responsetimoeout other than 60 and verify its value by using get
command
5. create a lb-config with
responsetimeout=0 and
verify its validation error
6. create a lb-config with responsetimeout
as a non
integer number and make sure appropriate error messages are thrown
httpsrouting option
5. create a lb-config
with
httpsrouting=false and verify its value
6. create a lb-config with httpsrouting
without any
values and verify its validation error
7. create a lb-config with httpsrouting=true
and verify its value
8. create a lb-config with httpsrouting
other than
true/false and verify if it is reported as error
reloadinterval option
9. create a lb-config with
reloadinterval=60
and verify its value
10. create a lb-config with reloadinterval=0
and verify its value
11. create a lb-config with reloadinterval
other than
60 and verify its value
11b. create a lb-config with
reloadinterval=-1 and verify its validation error
routecokkie
option
12. create a
lb-config with
routecookie=true and verify its value
13. create a lb-config with
routecookie=false and verify its value
14. create a lb-config with routecookie
without any
value specified and verify it is set to to true by default
monitor
option
15. create
a lb-config with monitor=true and verify its value
16. create a
lb-config with monitor=false and verify its value
target option and config
17. create a lb-config without a config name
and verify if the
lb config name is derived from the default server-referenced and it
named
after the default server - server-http-lb-config
18. create a lb-config without a config name
to the
cluster target and verify the lb config name is derived from the
cluster-referenced and it named by the cluster reference -
cluster1-http-lb-config
19. create a lb-config without a config name
to the
server target and verify the lb config name is derived from the
server-referenced and it named by the server reference -
server1-http-lb-config
20. create a lb-config with a assigned name to a
standalone server.
21. create a lb-config with target as a
nonexisting cluster/server, verify it is reported as a error
22. create a lb-config with target as a non
standalone instance of a cluster - verify if the command reports an
error message
23. create lb-config with target name as
configuration name which already exists in the domain and verify it is
reported as a error
24. create lb-config with config name and with the
same target
property
25. create a lb-config with property test1="This is Test" and
verity if property created correctly
26. create a lb-config property
test2=123:value3="Second Test"
2.0
delete-http-lb-config
2.0
Definition:
The delete-http-lb-config command deletes a load balancer
configuration (lb-config). Currently, the load balancer must not
reference any
clusters or instances before
it
can be deleted.
2.1 Usage:
delete-http-lb-config
config_name
1.2 Test cases: delete-http-lb-config
1. delete the lb-config which is referenced to a cluster
and verify it is reported an error
2. delete the lb-config which is referenced by a
standalone server and verify it is reported an error
3. delete the existing unreferenced
lb-config (having no server-ref) and verify it is deleted
4. delete the existing unreferenced lb-config
(having no cluster-ref) and verify it is deleted
5. delete a non existent lb-config and verify it is
reported as a error
6. delete an existent lb-config with a wrong target name
and verify it is reported as a error
3.0
list-http-lb-configs
3.0 Definition:
The list-http-lb-configs
command
lists the load balancer config (lb-config) and its clusters/instances,
or all the
load
balancer config in the domain.
3.1 Usage:
list-http-lb-configs
[target]
3.2 Test cases: list-http-lb-configs
1. list the lb-config associated with this
particular clusters by giving cluster name for the target option
2. list the lb-config associated with this particular
servers by giving server name for the target option
3. try to list the lb-config associated with a
particular cluster/server by giving cluster/server name for the target
option
and there is no instance/cluster is referencing the lb-config. Verify
the
list command does not list any cluster/instance
4. list the lb-configs in a domain by omitting the target
name and verify it lists all the lb config in the domain
4.0
create-http-lb-ref
4.0 Definition:
The create-http-lb-ref command is used to add an existing cluster to an
existing load balancer configuration (lb-config). Text
color
in purple is referenced for new attributes of
the command
4.1 Usage:
create-http-lb-ref
[--lbpolicy
lb_policy] [--lbpolicymodule
lb_policy_module] [--healthcheckerurl
url] [--healthcheckerinterval=30] [--healthcheckertimeout=10]
[--lbEnableAllInstances] [--lbEnableAllApplications] --config config_name | --lbname loadbalancer_name target
4.2 Test cases: create-http-lb-ref
1. Add server-ref to an existing server lb-config
without specifying any optional attributes and verify if the server-ref
is created sucessfully with default attribute values
2. Add cluster-ref to an existing cluster lb-config
without specifying any
optional attributes and verify if the cluster-ref is created
sucessfully
with default attribute values
3. Add a cluster-ref twice with the same lb-config
name and verify for the error message
4. Add a
cluster-ref with
--lbpolicy=weighted-round-robin and verify for lbpolicy values and other
attribute values as well
5. Add a cluster-ref with --lbpolicy=round-robin and verify for lbpolicy values and other
attribute values as well
6. Add a cluster-ref with --lbpolicy=user-defined
&
specified --lbpolicymodule=....\my-lbLib.so
and verify for lbpolicy values and other
attribute values as well
7. Add a cluster-ref with --healthcheckerurl=/
and verify for healthcheckerurl values and other
attribute values as well
8. Add a cluster-ref with --healthcheckerinterval=99
and verify for healthcheckerinterval values and other
attribute values as well
9. Add cluster-ref with --healthcheckertimeout=100
and verify for healthcheckertimeout values and other
attribute values as well
10. Add a cluster-ref with --lbEnableAllInstances=true
and verify for lbEnableAllInstances values and other
attribute values as well
11. Add a cluster-ref with --lbEnableAllApplications=true
and verify for lbEnableAllApplications values and other
attribute values as well
13. Add a cluster-ref with both
--config and --lbname options are
specified and verify for error message thown.
14. Add a server-ref with --lbname option to a targer server and
verify if lb-config and lbname are created for the server target
14. Add a cluster-ref with --lbname option to a cluster target
and verify if lb-config and lbname are
created for the cluster target
5.0
delete-http-lb-ref
5.0 Definition:
The delete-http-lb-ref command is
used to delete a
cluster/instance
reference from a load balancer config (lb-config). Text
color
in purple is referenced for new attributes of
the command
5.1 Usage:
delete-http-lb-ref [--force=true]
--config
config_name | --lbname loadbalancer_name target
5.2 Test cases: create-http-lb-ref
1. delete the server-ref with having all
applications disable and verify it is deleted
2. delete the cluster-ref and with having all
applications and servers disable and verify it is deleted
3. try delete a nonexisting server-ref and
verify appropriate error is thrown
4. try delete a nonexisting cluster-ref and
verify appropriate error is thrown
5. try to delete a cluster-ref with having all
applications and server enabled, and verify appropriate error is thrown
(force=false)
6. try to delete a cluster-ref with having all
applications enabled and servers disabled, and verify appropriate error
is thrown (force=false)
7. try to delete a cluster-ref with having all servers
enabled and application disabled, and verify appropriate error is
thrown (force=false)
8. try to delete a cluster-ref with having force=true
and all applications disabled, and verify it is deleted
9. try to delete a cluster-ref with having force=true
and all servers disabled, and verify it is deleted
10. try to delete a cluster-ref with having force=true and
all applications and server disabled, and verify it is deleted
11. try to delete a server-ref with force=true,
config and lbname options and verify
if error message is thrown
12. try to delete a cluster-ref with force=true and lbname
options and verify if lb-config and loadbalancer-name all deleted
13. try to delete a cluster-ref with having all applications and
servers disabled with force=false and lbname options. Verify if only
loadbalancer-name is deleted and an error message should appears for
trying to delete the lb-config
14.
try to delete a server-ref with having all applications disabled with
force=false and lbname options. Verify if only
loadbalancer-name is deleted and an error message appears for trying to
delete the lb-config
6.0
disable-http-lb-server
6.0 Definition:
The disable-http-lb-server
command
is used to disable a cluster/server managed by the load balancer
(lb-config).
6.1 Usage:
disable-http-lb-server [--timeout 30] target
6.2 Test cases: disable-http-lb-server
1. disable the server in the specified target
and specific time. Verify if the server is actually disable
2. disable the cluster in the specified
cluster name and verify it is disabled
3. try to disable a server in the specified
server
name which has lb-enabled in a false state and verify if a warning is
thrown
4. disable the server in the specified server
name with timeout option value is different than 30 and verify the
value is set
7.0
enable-http-lb-server
7.0 Definition:
The enable-http-lb-server
command
is used to re-enable a previously disabled load balancer (lb-config)
server
instance
7.1 Usage:
enable-http-lb-server target
7.2 Test cases: enable-http-lb-server
1. enable an instance server and verify
it is
enabled
2. enable an instance which is in
already enabled state and verify
appropriate INFO message is thrown
3. enable a cluster and verify it is
enabled
8.0
disable-http-lb-application
8.0 Definition:
The disable-http-lb-application
command
is used to disable a specific application managed by the load balancer
(lb-config).
8.1 Usage:
disable-http-lb-application [--timeout 30] --name
application_name
target
8.2 Test cases: disable-http-lb-application
1. disable the application for a server-config with the required
parameters
and verify it is disabled in 30 minnutes
2. disable the application for a
server-config with missing required
parameters one by one
and verify f appropriate error is thrown (invalidate test)
3. disable the application for a
server-config with timeout value other
than 30 and verify
it is set
4. disable the application for a
server-config with timeout value as 0
and verify it is set
5. disable the application for a
server-config which is not existing and verify appropriate
message is thrown
6. disable the application for a
cluster-config with all the parameters
and verify it is disabled
7. disable the application for a
cluster-config with missing required parameters one by one
and verify appropriate error is thrown
8. disable the application for a
cluster-config with timeout value other than 30 and verify
it is set
9. disable the application for a
cluster-config with timeout value as 0 and verify it is set
10. disable the application for a
cluster-config which is not existing and verify appropriate
message is thrown
9.0
enable-http-lb-application
9.0 Definition:
The enable-http-lb-application command is used to re-enable a
previously
disabled load balancer (lb-config) application.
9.1 Usage:
enable-http-lb-application --name application_name target
9.2 Test cases: enable-http-lb-application
1. enable an application for a server-ref with all the parameters and
verify it is
enabled
2. enable an application for a server-ref with
missing required
parameters one by
one and verify error messages are thrown (invalidate test)
3. enable an application for a server-ref with
application name which is already in the
enabled state and verify for an appropriate error message
4. enable a non-existing application for a
server-ref and verify error is thrown
5. enable an application for a cluster-ref
with all the parameters and verify it is
enabled for all instances in that cluster
6. enable an application for a cluster-ref
with missing required parameters one by
one and verify error messages are thrown
7. enable an application for a cluster-ref
with application name which is already in the
enabled state and verify for an appropriate error message
8. enable a non-existing application for a
cluster-ref and verify error is thrown
10.0
create-http-health-checker
10.0 Definition:
The create-http-health-checker command is to create a health checker to
a
load balancer configuration (lb-config). The command will require a
load
balancer reference configuration
10.1 Usage:
create-http-health-checker [--url "/"] [--config config_name]
[--interval
30] [--timeout 10] target
10.2 Test cases: create-http-health-checker
1. create a health checker with all the
parameters and verify it is created with the correct default values
2. create health checker with all the
parameters and with custom values
and verify it is created
3. create health checker with missing
required parameters one by one
and verify appropriate error messages are thrown
4. create a health checker with " " as
url and verify it is reported
as a error
5. create a health checker with url
which doesnot exist in the
specified target and verify it is get created
6. create a health checker with url
having HTTP GET parameters and
verify it is created ( /test/getApp?name=value)
7. create a health checker with interval
as 0 and verify it is reported
as error
8. create a health checker with interval
as a negative number and
verify it is reported as a error
9. create a health checker with interval
as some custom numbers
10. create a health checker with timeout as 0
and verify it is reported
as error
11. create a health checker with timeout as a
-ve number and verify it
is reported as error
12. create a health checker with non existing
config and verify it is
reported as a error
13. create a health checker with existing
config which already has
health checked created and it should be modified with new configuration
14. create a health checker with cluster name
as the config name and
verify health checker created.
11.0
delete-http-health-checker
11.0 Definition:
The delete-http-health-checker command is to delete a health checker to
a
load balancer configuration (lb-config)
11.1 Usage:
delete-http-health-checker --config config_name
target
11.2 Test cases: delete-http-health-checke
1. delete the health checker for the
specified
config
2. delete the health checker for a non
existing lb
config and
verify error is thrown
3. try to delete the health checker with config name as name of the
cluster and verify it is deleted
4. try to delete the health checker twice and verify it is reported as
a error ( what will be health checker when a health checker is deleted
?. When there is no health checker in a config how does a lb will check
the
instance state ?.) - optional test if time permitted
12.0
export-http-lb-config
12.0 Definition:
The export-http-lb-config command
is
used to explicitly create the loadbalancer.xml file consumed by the
load
balancer plugins (lb-config). Text
color
in purple is referenced for new atributes for
the command.
12.1 Usage:
export-http-lb-config
--config config_name |
--lbname loadbalanacer_name [--retrieve]
[file_name]
12.2 Test cases: export-http-lb-config
1. export a lb-config with the specified
config and a file_name option to the specified absolute path; verify
the
result
2. export a lb-config with the specified
config option and verify if the loadbalancer.xml.LB-CONFIG_NAME file is
export to the <appserver-install>domains/domain1/generated
dirrectory
3. export the config which is not
existing and verify error is thrown
4. export the config to a file location
for which there is no write permission and verify error is thrown
5. export the config to a file which is
already existing and verify it is overwritten (BUG)
6. try file name is a directory and
verify loadbalancaer.xml is created in the current directory
7 try to export a lb-config with
having --retrieve=true
option specified and verify if
target_loadblanacer.xml file is exported to the current machine
../domains/domain1/generated directory
8 try to export a lb-config from a
client agent with having --retrieve=true
option specified and
file_name=./test-loadbalancer.xml and verify if the test-loadbalancer.xml file is exported to the current
directory
9 try to export a lb-config from a
client agent with having --retrieve=true
option specified
and verify if
target_LB_CONFIG_loadbalancer.xml file is exported to the client
specified machine location
10. try to export a cluster lb-config with lbname option specified and verify if
loadbalancer.xml.LB-CONFIG_name file is created correctly
11. try to export a server
lb-config with lbname option specified and verify if
loadbalancer.xml.LB-CONFIG_name file is created correctly
12. try to export a server
lb-config with lbname and config options specified, verify the error
message thrown