Use the Benchmark Testing with Alfresco page for version compatibility.
/benchmark-cmis>git checkout V1.0
/benchmark-cmis>mvn tomcat7:run -Dmongo.config.host=<mongo-host>
...
[INFO] Using existing Tomcat server configuration at c:\work\projects\bm-cmis\target\tomcat
...
10:49:10,944 [localhost-startStop-1] [ INFO] [ MongoClientFactory: 124] - New MongoDB client created using URL: mongodb://mongo-host/?conne...
...
10:49:11,294 [localhost-startStop-1] [DEBUG] [ LifecycleController: 174] - Started components: appLifeCycleController
Nov 03, 2014 10:49:11 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ['http-bio-9090']
mvn tomcat7:redeploy -DskipTests -Dbm.tomcat.ip=<bmdriver-host> -Dbm.tomcat.port=9080 -Dbm.tomcat.server=bm-remote
http://bmdriver-host:9080/manager
Properties set for the test are inherited by each test run, which can then override any values as required. The choice about where to change properties (at the test level or at the test run level) depends on how the test is used.
The example given here will assume the latter case i.e. several test runs are going to be made against a single server for investigative purposes.
http://bmserver-host:9080/alfresco-benchmark-server
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 _may_ 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 | Time in seconds 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. |
CMIS Session Details | Test Folder Path | A folder within the server that ALL users can write to. This may need to be configured on the server before use. For the Alfresco test, log into Share using the admin user and create a folder called load1 in the Shared Files section. The setting to apply here (look at the WebDAV path for the folder) is /Shared/load1. |
CMIS Binding URL | The location of the CMIS atom or browser definition. For a standard Alfresco 5.0 instance, set this to http://${cmis.host}:${cmis.port}/alfresco/api/-default-/public/cmis/versions/1.1/browser. The host and port values will be substituted by the test application. | |
CMIS Binding Type | Either atompub or browser. For this example, use browser. | |
CMIS Server Port | Use 8080 for a default Alfresco server install. | |
CMIS Server Hostname | The server host name. It is important to use the same host name as used by the Alfresco Sign Up test so that the user data mirror name matches. As mentioned before, this value can be set once at the test level when performing repeated runs against the same server. | |
Load Control | CMIS Session Count | The number of CMIS sessions to start. Each session will choose a scenario to run through. The default of 20 is low and can be increased to get a longer-running test. |
Section | Property | Description |
---|---|---|
Load Control | CMIS Session Count | Defaults to 20. Increase to 60. |
CMIS Session Delay | The default load is 10 sessions per second (100ms delay between sessions). Change this to 1000 so that we have one session per second. Combined with the 60 sessions, we should have a test run of just over a minute. |
The application console or log file for the CMIS test application should display the following:
...
2:42:51,472 [TestRunPing-alfresco-benchmark-tests-cmis-1.0-0] [ INFO] [ TestRun: 398] - Test run application context starting:
Run ID: 5457776c3881731bc643bfb6
Test Name: CMIS_10
Run Name: TRIAL_01
Driver ID: 54575da73881ff768c85fec1
Release: alfresco-benchmark-tests-cmis-1.0
Schema: 0
Test Run Properties:
files.ftp.path=/sites/www.linuxfromscratch.org/images
...
12:42:51,727 [TestRunPing-alfresco-benchmark-tests-cmis-1.0-0] [ INFO] [ MongoClientFactory: 124] - New MongoDB client created using URL: mongodb://localhost/?safe=true&
...
12:42:52,255 [CMIS_10.TRIAL_01-Controller] [ INFO] [ EventController: 249] - Event processing started: CMIS_10.TRIAL_01 (64 events per second using 16 threads)
12:42:52,255 [TestRunPing-alfresco-benchmark-tests-cmis-1.0-0] [DEBUG] [ LifecycleController: 174] - Started components: testLifeCycleController
12:42:52,266 [TestRunPing-alfresco-benchmark-tests-cmis-1.0-0] [ INFO] [ TestRun: 227] - Transitioned test run to STARTED: 5457776c3881731bc643bfb6
If the test fails to progress from SCHEDULED to STARTED, it could be because:
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.CMIS_10.TRIAL_01.find({success:false}).pretty();