Domino on Linux/Unix, Troubleshooting, Best Practices, Tips and more ...

 
alt

Daniel Nashed

 

Domino Container automation testing

Daniel Nashed  24 July 2022 07:32:06

Containers are not only a good way to run Domino. It is also the perfect environment for automation testing.
Domino 12 introduced OneTouch Setup to automate deployments, which also lets you create reproducible Domino test server scenarios.

As a starting point I am building an automation test for the Domino image itself.
So in future for every commit on the Git repository I can run automation to ensure the image works.


The test automation can be used in your own environment as well after an image built in your environment.
It can be also be extended for your own application testing.


Docker allows you to run commands inside a running container via "docker exec" commands.
So any kind of test operations could be performed. For example you could run a curl command inside the running container.


I will start with a base-line test to see the main operations of the container are tested.
And I would be interested which type of testing you would add to the container image.


  • Bring a server up with OneTouch Setup
  • Use OneTouch Setup to create a CertMgr Micro CA and create a TLS Credentials document for HTTPS
  • Create an internet site via OneTouch Setup, start HTTP and check if the server responds via HTTPS


This should be already a good starting point and if those operations are successful, many components are indirectly tested.

But there will be more testing to also ensure the Domino start script and other components work well.


  • Check Domino version
  • Check JVM version
  • Check if transaction log has been created
  • Stop and start server with the embedded start script
  • Test various start script operations like archiving logs
  • Check if databases created by OneTouch Setup have been created
  • Run the default backup configuration and backup a database.
    The backup application by design creates the dominobackup.nsf on first start-up and ships with a ready to use configuration.
    Starting the backup the second time will backup to /local/backup.


A lot of the new Domino features are designed to support automation testing.
And can help you to build your own test environments for QA testing and other scenarios.


The options are endless and I am going to provide a framework for adding your own tests.
The framework includes easy to use test results, with auto generated CSV and JSON output in a standardized way.


Here is a sneak peek of what type of output am working on.

Logging test results are as simple as calling a single script function:


test_result "domino.server.onetouch.microca" "Domino One Touch MicroCA" "SUCCESS"


--------------------------------------------------------------------------------

Test Results JSON

--------------------------------------------------------------------------------


{

"testResults": {

"harness": "DominoCommunityImage",

"suite": "Regression",

"testClient": "testing.notes.lab",

"testServer": "testing.notes.lab",

"platform": "Linux-Docker",

"testBuild": "12.0.1FP1",

"testcase": [

 {

   "name": "domino.server.onetouch.microca",

   "description": "Domino One Touch MicroCA",

   "executionResult": "SUCCESS",

   "errorText": ""

 },

 {

   "name": "domino.server.onetouch.database",

   "description": "Domino One Touch Create Database",

   "executionResult": "ERROR",

   "errorText": ""

 }

]

}

}


--------------------------------------------------------------------------------

Test Results

--------------------------------------------------------------------------------


[SUCCESS]    domino.server.onetouch.microca

[ERROR]      domino.server.onetouch.database


--------------------------------------------------------------------------------


Success :   1

Error   :   1

Total   :   2

Links

    Archives


    • [IBM Lotus Domino]
    • [Domino on Linux]
    • [Nash!Com]
    • [Daniel Nashed]