Running Benchmark Applications: Alfresco Sign Up

cancel
Showing results for 
Search instead for 
Did you mean: 

Running Benchmark Applications: Alfresco Sign Up

derek
Established Member
0 1 2,198

What it Does


  • Create a large number of users in Alfresco, using multiple email domains.
  • Record the user's details in a local data mirror for reuse by subsequent tests.

> mongo bmserver.dt01/bm20-data
MongoDB shell version: 2.6.3
connecting to: bmserver.dt01/bm20-data
> db['mirrors.54.221.87.161.users'].count();
44710
> db['mirrors.54.221.87.161.users'].find().limit(2).pretty();
{
        '_id' : ObjectId('54494800e4b0cd67456e3b7a'),
        'randomizer' : 808797,
        'username' : '0000000.Test@00000.example.com',
        'password' : '0000000.Test@00000.example.com',
        'creationState' : 'Created',
        'firstName' : '0000000',
        'lastName' : 'Test',
        'email' : '0000000.Test@00000.example.com',
        'domain' : 'default'
}
{
        '_id' : ObjectId('54494800e4b0cd67456e3b7b'),
        'randomizer' : 719750,
        'username' : '0000001.Test@00000.example.com',
        'password' : '0000001.Test@00000.example.com',
        'creationState' : 'Created',
        'firstName' : '0000001',
        'lastName' : 'Test',
        'email' : '0000001.Test@00000.example.com',
        'domain' : 'default'
}

  • If a known sequence of users already exists on the Alfresco server, the test allows for the data mirror to be created with creationState=Created without actually performing the sign up process.
  • Record, in detail, an errors that occurred during individual user creation attempts
  • Record event timings for the sign up process.


Prerequisites


Use the Benchmark Testing with Alfresco page for version compatibility.


  • Java 1.7.0_51 or later
  • MongoDB 2.6.3 or later installed and running on port 27017 on some server: <mongo-host>
  • A compatible version of the Benchmark Server running on a Tomcat7 at port 9080: <bmserver-host>
  • Alfresco with /alfresco available: <alfresco-host>


Deploying


Local Deployment


  • Check out source code of ent-signup test.
  • Build and start a local Tomcat7 instance
/ent-signup/tags/V2.0>mvn tomcat7:run -Dmongo.config.host=<mongo-host>


...
INFO: Initializing ProtocolHandler ['http-bio-9082']
Oct 27, 2014 11:15:32 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Tomcat
Oct 27, 2014 11:15:32 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.47
Oct 27, 2014 11:15:35 AM org.apache.catalina.core.ApplicationContext log
INFO: Spring WebApplicationInitializers detected on classpath: [org.alfresco.bm.web.WebApp@1e7a60f7]
Oct 27, 2014 11:15:35 AM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
11:15:35,944 [localhost-startStop-1] [ INFO] [                 MongoClientFactory: 124] - New MongoDB client created using URL: mongodb://<mongo-host>/?connectTimeoutMS=5000
...
11:15:36,304 [localhost-startStop-1] [DEBUG] [                LifecycleController: 174] - Started components: appLifeCycleController
Oct 27, 2014 11:15:36 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ['http-bio-9082']

Remote Deployment


  • Set up a Tomcat7 load driver instance with the manager application listening on port 9080 and configure your Maven settings with the manager application credentials.
  • Deploy the application directly into the load driver:
mvn tomcat7:redeploy -DskipTests  -Dbm.tomcat.ip=<bmdriver-host> -Dbm.tomcat.port=9080 -Dbm.tomcat.server=bm-remote

  • Connect to the driver server and check that the application was successfully deployed.
 http://bmdriver-host:9080/manager

  • You can start/stop the driver applications as required


Create and Start a Test Run


  • Connect to the Benchmark Server (substitute the host where the application is running)
http://bmserver-host:9080/alfresco-benchmark-server

  • Create a new test, SIGNUP'' using alfresco-benchmark-tests-ent-signup-2.0-schema: 3 or whichever version you deployed
  • The property edit page is displayed, but can also be accessed using the gears icon.
  • Click on the Driver Details box, which will show details of all compatible driver(s) connected to the same configuration database.
  • The following properties should be set for all new tests:









Section
Property
Description
MongoDB Connection mongo.test.host The hostname of a MongoDB server where the test results and general working data will be stored.  This should be an IP address that is visible to all load drivers and can be the same MongoDB instance as the configuration database.  This value must always be set for new tests, as there is no working default.  A value of 'localhost' is dangerous and should not be used except for local testing.
Test Controls Test Duration Maximum time for the test to run.  This acts as an emergency shut off if the test is unable to complete the desired operations e.g. if the server-in-test fails to respond to new session requests and each session only times out after 5s.

Test Duration Unit The unit in which the Test Duration is expressed: SECONDS, MINTUES, HOURS or DAYS.

  • Click back up to the SIGNUP test.  You should be presented with 'No test runs found ...'.
  • Create a test run named after the server you want to access, e.g. JUPITER_10K' if you want to create 10,000 users on system 'Jupiter'.
  • The list of test runs is displayed.  Edit the properties for the test run (cog icon next to the test run).
  • Notice that the properties you set in the test are inherited by the test run.  You need only set values that are specific to the test run.  Since the signup test is normally reused for different servers each time, we normally only set the target server at the test run level:









Section
Property
Description
Alfresco Server Details alfresco.port Defaults to 8080 so only requires setting if Alfresco is exposed via another port.
Alfresco Server Details alfresco.server NB: This should be set to an IP address so that all drivers can access the Alfresco server remotely.  This value will also be used when storing mirror data such as users that have been created in Alfresco, etc.
Signup Load Parameters Number of Users The number of users to create.

  • Click back up to the SIGNUP test.  You should see the list of test runs.
  • Click the run button.


Handling failures


If the test fails to progress from SCHEDULED to STARTED, it is normally because the mongo.test.host has not been set.  Currently the only way to see the error is to locate the tests log file.

If the test starts but experiences a high number of failures, the failures can be accessed directly in the MongoDB results.  The video, Following up on Failures shows how this can be done.  It is especially useful when the server under load starts to produce errors or fails to respond correctly.  From the MongoDB console, it would look something like this:

 mongo <mongo-data-host>
use bm20-data
db.SIGNUP.JUPITER_01.find({success:false}).pretty();



Extra Information


1 Comment