4.10.2.1 Create a project   

 



 

When we create a project it will automatically generate testcases.  Using this testsuite we can test the agent in the device.  

 

Change the working directory to <AT_HOME>/bin directory.

 

Create a project by invoking the following script.

 

generateProject.bat -prj <AT_HOME>/snmpprojects/<ProjectName>.prj -loadMIB <absolute path to mib>

  -agentHost <agentName> -agentPort <portNo> -community <readCommunity>

 -retries <number of retries> -timeout <no of millisecs> -writecommunity <writecommuity name>

 

The argument to this option (-prj) is <AT_HOME>\snmpprojects\<ProjectName>.prj

 

<AT_HOME>

is the directory in which AgentTester product is installed.

<ProjectName>

ProjectName is the name of the project to be created.

<agentName>

name of device which is to be tested.  Default value is localhost

<portNo>

port number in which the snmp daemon process is running. Default value is 161.

<readCommunity>

 the read community of the device which name is <agentName> as given above.  Default value is public.

<timeout>

the timeout value specifies the maximum time interval the snmp engine will wait for a request. Default value is 100

<retries>

the retries value specifies that number of attempts that the snmp engine will make if the communication is interrupted. Default value for retries is 50.

<writecommunity>

the community name which should be used for write operations.  Default value is private

 

  The above arguments should take only absolute path as argument.  As of now projects can only be created under the product home directory.  Mibs can be loaded from any directory.  But it will be safe to copy the mibs under <ProductHome>/mibs directory and then load using the above mentioned script.

  

When a project is created the following type of test cases are created

 

Functionality Testcases

 

Functionality testcases are similar to the testcases generated in the GUI mode.  Testcases are generated for various clauses as per  RFC standards. Agent tester will test SNMP functionalities like GET, GETNEXT, SET & GETBULK for scalar, tabular instances. Agent Tester will also check those columns with row-status as syntax row status and row creation functionality in agent and it will check the proper functioning of SNMP errors  like error-index, error-status as per RFC standards. These testcases are found in the following directories.

 

The following directories contains testcases which test different aspect of the SNMP protocol operations, namely the scalar, table, error-index, error-status,

 

<AT_HOME>/snmpprojects/<ProjectName>/testcases/cmdLine/functionality/v1get/scalar/

<AT_HOME>/snmpprojects/<ProjectName>/testcases/cmdLine/functionality/v1get/table/

<AT_HOME>/snmpprojects/<ProjectName>/testcases/cmdLine/functionality/v1get/all/

<AT_HOME>/snmpprojects/<ProjectName>/testcases/cmdLine/functionality/v1set/scalar/

<AT_HOME>/snmpprojects/<ProjectName>/testcases/cmdLine/functionality/v1set/table/

<AT_HOME>/snmpprojects/<ProjectName>/testcases/cmdLine/functionality/v1getnext/

<AT_HOME>/snmpprojects/<ProjectName>/testcases/cmdLine/functionality/v2get/scalar/

<AT_HOME>/snmpprojects/<ProjectName>/testcases/cmdLine/functionality/v2get/table/

<AT_HOME>/snmpprojects/<ProjectName>/testcases/cmdLine/functionality/v2get/all/

<AT_HOME>/snmpprojects/<ProjectName>/testcases/cmdLine/functionality/v2set/scalar/

<AT_HOME>/snmpprojects/<ProjectName>/testcases/cmdLine/functionality/v2set/table/

<AT_HOME>/snmpprojects/<ProjectName>/testcases/cmdLine/functionality/v2set/all/

<AT_HOME>/snmpprojects/<ProjectName>/testcases/cmdLine/functionality/v2getnext/

<AT_HOME>/snmpprojects/<ProjectName>/testcases/cmdLine/functionality/v2getbulk/

     

Custom Testcases

 

Custom testcases checks for the proper functioning of each node in a MIB. Testcases are generated for nodes, will test as given.

The set of custom testcases are generated and placed  under the following directory structure.

    

<AT_HOME>/snmpprojects/<ProjectName>/testcases/cmdLine/custom/scalar

<AT_HOME>/snmpprojects/<ProjectName>/testcases/cmdLine/custom/table

 

Stress Testcases

       

For stress testing, we have provided with a default OID which will be tested continuously for 10 seconds.  Then the system will wait for 2 seconds.  After waiting for 2 seconds, 5 requests will be sent and if all the requests are responded by the agent without any error, the testcase is passed. Testing parameters like OID to be tested and duration of testing [number of seconds] can be configured.

 

The testcase templates are generated under the following directory.  

 

<AT_HOME>/snmpprojects/<ProjectName>/testcases/cmdLine/stress

    

Performance Testcases

       

For performance testing, 1000 requests are sent to the agent, and if all the 1000 requests are responded without any errors, then we will get a pass result.  Testing parameters like OID to be tested and duration of testing [number of seconds] can be configured.

 

The testcase templates are generated under the following directory.

 

<AT_HOME>/snmpprojects/<ProjectName>/testcases/cmdLine/performance/



Copyright © 2009, ZOHO Corp. All Rights Reserved.