AdminCLI test specification for 9.1 ( Glassfish V2)




Covered features
I
connectionpool enhancements
portbase option for create-domain command
syncinstance option for start-node-agent command
monitoring command "monitor"
Exit codes for start/stop commands
Deprecation of --adminuser and --adminport options
asadmin help
usage texts
Resource Templates

II. Load balancer commands
III. JBI Commands

References

Connection pool enhancements


Index
Priority
Test-Id
Testcase-Description
Status
Comments
1
P2
lazy-connection-association lazy-connection-association
  • create a jdbc connection pool
  • use asadmin set to set attr to true
  • use asadmin get to verify the attr is true
  • use asadmin set to set attr to false
  • use asadmin get to verify the attr is false
  • use asadmin set to set attr to "tRuE | FALsE"
  • verify the asadmin doesn't throw any error due to upper and lower case letters



2
P2 lazy-connection-enlistment lazy-connection-enlistment
  • create a jdbc connection pool
  • use asadmin set to set attr to true
  • use asadmin get to verify the attr is true
  • use asadmin set to set attr to false
  • use asadmin get to verify the attr is false
  • use asadmin set to set attr to "tRuE | FALsE"
  • verify the asadmin doesn't throw any error due to upper and lower case letters



3
P2 associate-with-thread associate-with-thread
  • create a jdbc connection pool
  • use asadmin set to set attr to true
  • use asadmin get to verify the attr is true
  • use asadmin set to set attr to false
  • use asadmin get to verify the attr is false
  • use asadmin set to set attr to "tRuE | FALsE"
  • verify the asadmin doesn't throw any error due to upper and lower case letters



4
P2 match-connections match-connections
  • create a jdbc connection pool
  • use asadmin set to set attr to true
  • use asadmin get to verify the attr is true
  • use asadmin set to set attr to false
  • use asadmin get to verify the attr is false
  • use asadmin set to set attr to "tRuE | FALsE"
  • verify the asadmin doesn't throw any error due to upper and lower case letters



5
P2 allow-non-component-callers allow-non-component-callers
  • create a jdbc connection pool
  • use asadmin set to set attr to true
  • use asadmin get to verify the attr is true
  • use asadmin set to set attr to false
  • use asadmin get to verify the attr is false
  • use asadmin set to set attr to "tRuE | FALsE"
  • verify the asadmin doesn't throw any error due to upper and lower case letters



6
P2 connection-leak-timeout-in-seconds connection-leak-timeout-in-seconds
  • create a jdbc connection pool
  • use asadmin set to set attr to some valid value
  • use asadmin get to verify the attr returned as set



7
P2 connection-leak-reclaim connection-leak-reclaim
  • create a jdbc connection pool
  • use asadmin set to set attr to true
  • use asadmin get to verify the attr is true
  • use asadmin set to set attr to false
  • use asadmin get to verify the attr is false
  • use asadmin set to set attr to "tRuE | FALsE"
  • verify the asadmin doesn't throw any error due to upper and lower case letters



8
P2 connection-creation-retry-attempts connection-creation-retry-attempts
  • create a jdbc connection pool
  • use asadmin set to set attr to some valid value
  • use asadmin get to verify the attr returned as set


9
P2 connection-creation-retry-interval-in-seconds connection-creation-retry-interval-in-seconds
  • create a jdbc connection pool
  • use asadmin set to set attr to some valid value
  • use asadmin get to verify the attr returned as set


10
P2 is-connection-validation-required is-connection-validation-required
  • create a jdbc connection pool
  • use asadmin set to set attr to true
  • use asadmin get to verify the attr is true
  • use asadmin set to set attr to false
  • use asadmin get to verify the attr is false
  • use asadmin set to set attr to "tRuE | FALsE"
  • verify the asadmin doesn't throw any error due to upper and lower case letters



11
P2 validate-atmost-once-period-in-seconds validate-atmost-once-period-in-seconds

  • create a jdbc connection pool
  • use asadmin set to set attr to some valid value
  • use asadmin get to verify the attr returned as set



12
P2 statement-timeout-in-seconds statement-timeout-in-seconds

  • create a jdbc connection pool
  • use asadmin set to set attr to some valid value
  • use asadmin get to verify the attr returned as set



13
P2 max-connection-usage-count max-connection-usage-count

  • create a jdbc connection pool
  • use asadmin set to set attr to some valid value
  • use asadmin get to verify the attr returned as set



14
P2 wrap-jdbc-objects wrap-jdbc-objects
  • create a jdbc connection pool
  • use asadmin set to set attr to true
  • use asadmin get to verify the attr is true
  • use asadmin set to set attr to false
  • use asadmin get to verify the attr is false
  • use asadmin set to set attr to "tRuE | FALsE"
  • verify the asadmin doesn't throw any error due to upper and lower case letters


Portbase option for create-domain command
Index
Priority
Test-Id
Testcase-Description
Status
Comment
1
P2
portbase-option-1
  • create-domain --user admin --port port_number --portbase 9999 domain_name
  • verify all the ports picked are sums of 9999


2
P3 portbase-option-2
  • create-domain --user admin --portbase 0 domain_name
  • verify default ports are picked


3
P3 portbase-option-3
  • create-domain --user admin --portbase 65535 domain_name
  • verify the commad fails with "cannot assign port number" error


4
P3 portbase-option-4
  • create-domain --user admin --portbase 10000 domain_name1
  • start-domain domain_name
  • create-domain --user admin --portbase 10000 domain_name2
  • verify the commad fails with "cannot assign port number" error


5
P3 portbase-option-5
  • create-domain --user admin --adminport port_number --portbase 10000 
    --domainproperties jms.port=8981:domain.jmxPort=9090 domain_name
  • create-domain --user admin --port port_number --portbase 10000 
    domain_name
  • create-domain --user admin --instanceport port_number --portbase 10000 
    domain_name
  • Verify the command fails printing the error message "options are mutually exclusive"


6
P3
portbase-option-6
  • create-domain --user admin --port port_number --portbase 10,000 --domainproperties orb.listener.port=99999 domain_name
  • verify command fails with "invalid portbase" error


7
P2
portbase-option-7
  • create-domain --user admin --portbase 500 domain_name
  • verify the command prints a warning message since the ports are under 1024


8
P2
portbase-option-8
  • run a sample program to use a particular port
  • create-domain with --portbase value that collides with used port for all ports
  • verify it throws error that the port is in use and command should fail.


start-node-agent command new option syncinstance
1
P1
start-na-syncins1
  • start domain / nodeagent / instances
  • stop instances / nodeagents
  • deploy a application
  • start-node-agent --syncinstance=true
  • verify the instances picks up the deployed application when it was down


2
P2
start-na-syncins2
  • start domain / nodeagent / instances
  • stop instances / nodeagents
  • deploy a application
  • start-node-agent --syncinstance=false
  • verify the instances doesn't picks up the deployed application when it was down


3
P3
start-na-syncins3
  • stop all the running instances
  • start-node-agent --syncinstance=true --startinstances=false
  • The nodeagent should start fine without starting the instances


4
P1
start-na-syncins4
  • start domain/nodeagent/instances
  • deploy a application
  • stop-node-agent
  • start-node-agent --syncinstance=true 
  • verify the instances picks up the deployed application


Monitoring command "monitor"
monitor --type monitor_type [--user admin_user] [--port 4849] [--passwordfile file_name] [--host localhost] [--terse=false] [--echo=false] [--interactive=true]  [--secure|-s=true] [--filename filename] [--interval 30] [--filter name] server
1
P2
monitor-webmodule
  • deploy a webmodule
  • turn on monitoring
  • asadmin monitor webmodule
  • verify values matches with asadmin get --monitor command
  • asadmin monitor --filename=file webmodule
  • verify that the stats are exported in cvs format to the
    specified file

Spec is not updated with exact valid type values
2
P2
monitor-httpservice
  • turn on monitoring for httpservice
  • asadmin monitor httpservice
  • verify values matches with asadmin get --monitor command
  • asadmin monitor --filename=file httpservice
  • verify that the stats are exported in cvs format to the
    specified file


3
P2
monitor-jdbcpool
  • create a jdbcconnectionpool
  • turn on monitoring for jdbc connectionpool
  • asadmin monitor jdbcconnectionpool
  • verify values matches with asadmin get --monitor command
  • asadmin monitor --filename=file
    jdbcconnectionpool
  • verify that the stats are exported in cvs format to the
    specified file


4
P2
monitor-ctrpool
  • create a connectorconnectionpool
  • turn on monitoring for connector connection pool
  • asadmin monitor connectorconnectionpool
  • verify values matches with asadmin get --monitor command
  • asadmin monitor --filename=file connectorconnectionpool
  • verify that the stats are exported in cvs format to the
    specified file


5
P2
monitor-servlet
  • deploy a webmodule containg a servlet
  • turn on monitoring
  • asadmin monitor servlet
  • verify values matches with asadmin get --monitor command
  • asadmin monitor --filename=file servletverify that the stats are exported in cvs format to the
    specified file


6

monitor-beanpool
  • deploy a ejbmodule 
  • turn on monitoring for ejb-container
  • asadmin monitor beanpool
  • verify values matches with asadmin get --monitor command
  • asadmin monitor --filename=file beanpool
  • verify that the stats are exported in cvs format to the
    specified file


7

monitor-beancache
  • deploy a ejbmodule
  • turn on monitoring for ejb container
  • asadmin monitor beancache
  • verify values matches with asadmin get --monitor command
  • asadmin monitor --filename=file beancache
  • verify that the stats are exported in cvs format to the specified file


8

monitor-jvm
  • turn on monitoring for jvm
  • asadmin monitor jvm
  • verify values matches with asadmin get --monitor command
  • asadmin monitor --filename=file jvm
  • verify that the stats are exported in cvs format to the specified file


9

monitor-txservice
  • deploy a transactionservice application
  • turn on monitoring for transaction service
  • asadmin monitor transactionservice
  • verify values matches with asadmin get --monitor command
  • asadmin monitor --filename=file transactionservice
  • verify that the stats are exported in cvs format to the specified file


10

monitor-filters
  • deploy a transactionservice application 
  • turn on monitoring for transaction service
  • asadmin monitor transactionservice
  • asadmin monitor --filtername=activeids
  • verify report contain only activeids stats


11

monitor-cvsfile-relativepath
  • deploy a transactionservice application
  • turn on monitoring for transaction service
  • asadmin monitor --filename=./file transactionservice
  • command should succeed by taking the relative path of the file


12

monitor-cvsfile-absolutepath
  • deploy a transactionservice application
  • turn on monitoring for transaction service
  • asadmin monitor --filename=/file transactionservice
  • command should succeed by taking the absolute path of the file



13

monitor-nonexisting-filter
  • deploy a transactionservice application
  • turn on monitoring for transaction service
  • asadmin monitor --filtername=non-existing transactionservice
  • command should fail with errror message that the filter cannot be found 



14

monitor-nonexisting-element
  • deploy a transactionservice application
  • turn on monitoring asadmin monitor non-existing
  • command should fail with errror message that the element cannot be found 


Exit Codes for start/stop commands
1
P2
start-dom-exit-1
  • start-domain domain1
  • verify the exit code of the last start-domain command is 0
  • start-domain domain1
  • verify the exit code of the last start-domain command is 0
      
      


2

start-dom-exit-2
  • start-domain non-existing
  • verify the exit code of the last start-domain command is 1


3

start-dom-exit-3
  • create 2 domains with same port
  • start-domain domain1
  • verify the exit code of the last start-domain command is 0
  • start-domain domain2
  • verify the exit code of the last start-domain command is 1


4

start-na-exit-1
  • create-node-agent
  • start-node-agent
  • start-node-agent
  • verify the start-node-agent command was successfull and exit code is 0


5

start-na-exit-2
  • create-node-agent  by giving non existing DAS ports
  • start-node-agent
  • verify the start-node-agent command fails and exit code is 1


6

start-na-exit-3
  • create-node-agent
  • create-instance 1
  • create-instance 2 by giving the same port numbers
  • start-node-agent
  • verify the start-node-agent command fails and exit code is 1


7

start-ins-exit-1
  • create-instance 1
  • start-instance 1
  • start-instance 1
  • verify the start-instance command succeeds and exit code is 0


8

start-ins-exit-2
  • create-instance 1
  • create-instance 2 by giving the same port number as of instance 1
  • start-instance 1
  • start-instance 2
  • verify the last start-instance command fails and exit code is 1


9

start-ins-exit-3
  • create-instance 1 with a not yet created nodeagent
  • start-instance 1
  • verify the start-instance command fails and exit code is 1


10

start-ins-exit-4
  • start instance not existing and verify exit code is 1


11

start-ins-exit-4
  • create-instance 1 with not running NA
  • start-instance 1
  • verify the start-instance command fails and exit code is 1


12

start-clu-exit-1
  • create-cluster cluster1 and 2 instances in it
  • start-instance 1
  • start-instance 2
  • start-cluster cluster1
  • verify the start-cluster command succeeds and exit code is 0


13

start-clu-exit-2
  • create-cluster cluster1 and 2 instances in it
  • start-cluster cluster1
  • start-cluster cluster1
  • verify the start-cluster command succeeds and exit code is 0


14

start-clu-exit-3
  • create-cluster cluster1 and 2 instances in it
  • stop-node-agent na
  • start-cluster cluster1
  • verify the start-cluster command fails and exit code is 1


15

start-clu-exit-4
  • create-cluster cluster1 and 2 instances in it with not yet created node agent
  • start-cluster cluster1
  • verify the start-cluster command fails and exit code is 1


16

start-clu-exit-5
  • start-cluster non-existing
  • verify the command fails and exit code is 1


17


  • start cluster not existing and verify exit code is 1


18

stop-dom-exit-1
  • stop-domain domain1 
  • verify the command succeeds and exit code is 0


19

stop-dom-exit-2
  • stop-domain domain1 
  • stop-domain domain1 
  • verify the command succeeds and exit code is 0


20

stop-dom-exit-3
  • stop-domain non-existing
  • verify the command fails and exit code is 1


21

stop-ins-exit-1
  • stop-instance 1
  • verify the command succeeds and exit code is 0


22

stop-ins-exit-2
  • stop-instance 1
  • stop-instance 1
  • verify the command succeeds and exit code is 0


23

stop-ins-exit-3
  • stop-instance non-existing
  • verify the command fails and exit code is 1


24

stop-ins-exit-4
  • stop-instance 1 (which nodeagent not yet created)
  • verify the command fails and exit code is 1


25

stop-clu-exit-1
  • stop-cluster cl1
  • verify the command succeeds and exit code is 0


26

stop-clu-exit-2
  • stop-cluster cl1
  • stop-cluster cl1
  • verify the command succeeds and exit code is 0


27

stop-clu-exit-3
  • stop-cluster cl1 with no instances in it
  • verify the command fails and exit code is 1


28

stop-clu-exit-4
  • stop-instance 1
  • stop-instance 2
  • stop-cluster cl1
  • verify the command succeeds and exit code is 0


29

stop-clu-exit-5
  • stop-node-agent
  • stop-cluster cl1
  • verify the command fails and exit code is 1


30


  • stop cluster not existing and verify exit code is 1


31

stop-na-exit-1
  • stop-node-agent agent1
  • verify the command succeeds and exit code is 0


32

stop-na-exit-2
  • stop-node-agent agent1
  • stop-node-agent agent1
  • verify the command succeeds and exit code is 0


33

stop-na-exit-3
  • stop-node-agent non-existing
  • verify the command fails and exit code is 1


Deprecation of --adminuser and --adminport options
1
P3
deprecate-adminoptions-1
  • create-domain --adminuser admin 
  • verify command reports that this option is deprecated and creates
  •  the domain successfully.


2
P1
deprecate-adminoptions-2
  • create-domain --user admin 
  • verify command succeeds.


3
P3
deprecate-adminoptions-4
  • create-domain --adminuser admin --adminport 4848 --user admin1 
  • verify command reports that adminuser option is deprecated and uses
    --adminuser option value


4
P3
deprecate-adminoptions-5
  • put AS_ADMIN_PASSWORD as well as
    AS_ADMIN_ADMINPASSWORD nv pairs in a passwordfile
  • create-domain --adminuser admin --user admin1 --passwordfile passwordfile
  • verify command reports that these options are deprecated and uses
    AS_ADMIN_ADMINPASSWORD for its admin password and --adminuser for adminuser


asadmin help
1
P2
asadmin-help-keyword1
  • asadmin help create
  • should display all the commands that has create token in their commands


2
P3
asadmin-help-keyword2
  • asadmin help non-existing-command
  • verify that the command fails and reports that there is no subcommands


3
P2
asadmin-help-wildcard
  • asadmin list*
  • verify the asadmin prints all commands starting with list


Man pages for common options and concepts
1

asadmin-manpage-com-op
  • verify the man pages for common
    options like user port password etc.,


2

asadmin-manpage-concepts
  • verify the man pages for
    concepts like instance , cluster , domain


usage texts
1

asadmin-usage-1
verify the usage texts for commands .
The usage text should contain required options first and optional options next

manual
2

asadmin-usage-2
asadmin create
verify that the command create doesn't exist and it prints the following info message
"Try using asadmin help create to find a list of commands having keyword create"

manual






Interactive commands


1
P1
test-interactive
  • asadmin list-components
  • should prompt for all the required options one by one

manual
Resource Templates
1
P2
javadb-resource-create
  • asadmin add-resources javadb_type4_datasource.xml
  • verify command successfully adds the resources
  • verify that the pool is functional by utilizing the pool


2
P2
oracle-resource-create
  • asadmin add-resources oracle_type4_datasource.xml
  • verify command successfully adds the resources
  • verify that the pool is functional by utilizing the pool


3
P2 mysql-resource-create
  • asadmin add-resources mysql_type4_datasource.xml
  • verify command successfully adds the resources
  • verify that the pool is functional by utilizing the pool


4
P2 postgresql-resource-create
  • asadmin add-resources postgresql_type4_datasource
  • verify command successfully adds the resources
  • verify that the pool is functional by utilizing the pool


5
P3
add-resources-rel-path
  • asadmin add-resources ./postgresql_type4_datasource
  • asadmin add-resources postgresql_type4_datasource
  • verify command successfully adds the resources




Total tests
Index
Feature
Total Tests
1
Connection Pool attributes
14
2
Portbase option
8
3
Sync instances option
4
4
Monitoring command
14
5
Exit codes
33
6
admin option deprecation
4
7
asadmin help
3
8
asadmin usage text
2
9
jdbc resource templates
5
10
asadmin man pages
2


89




References

Glassfish V2 CLI One pager