Hi
Is there a way that we can perform following auto testing procedure by automation script?
Step 1. get all elements which are using the same protocol (can achieve by using automation script)
Step 2. for each element from step 1 we do following:
2.1: do SNMP SET and verify the results (by seeing alarms from the devices in the alarm console)
2.2: record the results (if see the alarms then PASS; if not see alarms then FAIL and record the reason why it fails) in the reports
Step 3. use automation script to email the report (can be achieved in automation script)
I think step 1 and 3 can be achieved by automation script but not sure about how to use automation script to verify the alarms and write the test results into a report.
Just would like to know the above automation procedure can be achieved or not.
Thanks for sharing any ideas.
Hi Peng Fei,
For the first step, you can achieve this by using the following code:
IDMs dms = engine.GetDms();
var elements = dms.GetElements().Where(x => x.Protocol.Name.Equals("YourProtocolName")) // You can add more checks which are recommended, e.g x.State == ElementState.Active && x.IsStartupComplete()
You will need the following NuGet Skyline.DataMiner.Core.DataMinerSystem.Automation
For the third step, you should use NuGet Skyline.DataMiner.Utils.QAPortalAPI. You can find examples and guides here:
NuGet Gallery | Skyline.DataMiner.Utils.QAPortalAPI 1.0.14
Hope it helps!
Hi,
For step 2.2, is it not an option to read the SNMP parameter after performing the SNMP set? Since you already know the thresholds that will trigger an alarm, you could compare the retrieved value against the threshold to confirm if an alarm was triggered.
Hope it helps.
Hi Peng Fei,
In the automation script you could send an email notification with the results of your tests. As Ibrahim suggested, you could also use the QAPortalAPI Nuget package. This package will allow you to implement regression tests and send the results via email notification.
Hope it helps.
Hi Miguel, thanks for the help.
“you could compare the retrieved value against the threshold to confirm if an alarm was triggered.”
Thanks for sharing this idea. Yes, i get use getParameter to get the value of the parameter and compare to the threshold.
And how can i record all these steps and results into one report in my automation script? do we have any example that we can use automation script to write a report? thanks