---
# System prepended metadata

title: Server Info test cases
tags: [server_Info]

---

# Server Info test cases

###### tags: `server_Info`
```
API Branch name: merge_nayana_api_joe_pm2
UI Branch name: device_version_nayana
Database : serverInfo-db-nayana
Tested by : Joe & Nayana
Test Result: Pass for all test cases.
Date: 10-02-2022
```
#### Note: Before test please delete all  records from deviceStatus and log Collection

### Test Cases on 10-02-2022,
1) Test Device status update to database or not
    - delete records from deviceStatus collection
    - Run API & UI
    - Device status data will be available for all device list
2) Test Device alive status change or not
    - modify device status record and change alive status from ON to OFF or OFF to ON
    - After sync data (5 minutes) status will update 
3) Test to get device data for empy data and alive status
    - Device list: serilaNo = 011, IP 10.10.80.10333 For this list data will be empty
    -  Update device list IP to 10.10.80.103 This should update data in deviceStatus collection serilaNo = 011
4) Update Device version & log
    - DEviceStatus: {serilaNo = 002}; Update data.version to "TEST"
    - After sync it should update data.version as per server version value.
    - It will update record will add into log collection
6) Test version/config/pm2 error
    - stop api server and update ssh command to wrong command/path
    - You can able to see approprate error in "devicestatus" collection error field

```
API Branch name: get_db_version_nayana
UI Branch name: device_version_nayana
Database : iei-serverInfo-db-nayana
Tested by : Joe & Nayana
Test Result: 
    EdgeServer test: Pass by Joe
    Database Test: Pass by Nayana
Date: 21-02-2022
```
### Test Cases (21-02-2022)
1) Test Device status update to database or not
    - delete records from deviceStatus collection
    - Run API & UI
    - Device status data will be available for all device list
2) Test Device alive status change or not
    - modify device status record and change alive status from ON to OFF or OFF to ON
    - After sync data (5 minutes) status will update 
3) Test to get device data for empy data and alive status
    - Device list: serilaNo = 011, IP 10.10.80.10333 For this list data will be empty
    -  Update device list IP to 10.10.80.103 This should update data in deviceStatus collection serilaNo = 011
4) Update Device version & log
    - DEviceStatus: {serilaNo = 002}; Update data.version to "TEST"
    - After sync it should update data.version as per server version value.
    - It will update record will add into log collection
5) Test version/config/PCID error
    - Change the file name of  .version or Config.js in ES 
    - You can able to see approprate error in "devicestatus" collection error field
    - check whether back to normal when it error is solved.
    
6) Test ES service error (Use ES : 192.168.0.7)
	- Stop the PM2 service using command ("pm2 stop app0 or app1")
	- You can able to see approprate error in "devicestatus" collection error field.
	- check whether back to normal when it error is solved.

7) Test Rabbitmq error (Use ES : 192.168.0.7)
	- Stop Rabbitmq service uing cmd (systemctl stop rabbitmq-server)
	- You can able to see approprate error in "devicestatus" collection error field.
	- check whether back to normal when it error is solved.


#### Database test case
1) Check database Connection, record error in deviceStatus collection (SerialNo: 002)
    - Delete all records from device status collectin
    - Update port to wrong port Port = 27019 
    - Record will add in deviceStatus collection including {error= connection error, alive:off,data {}}
2) Modify port to 27019 for SerialNo = 002,
    - data should update in deviceStatus collection, Error should be null
3) Check database version difference,
    - it should update deviceStatus.data field
    - add log message in log collection

#### UI test case
1) If Information has error, then dispay red smbol
    - ![](https://i.imgur.com/Tqpk5Q7.png)


### Test Cases (24-02-2022)
```
API Branch name: get_db_version_nayana
Api tag: V0.1
UI Branch name: viyaModify_real
UI tag: V0.1
Database : iei-serverInfo-db (10.10.80.103:27020)
Tested by : Nayana
Test Result: 
    UI test: Pass
    API Test: Pass
Date: 21-02-2022
```

1) API: Insert DeviceList using postman  https://10.10.80.103:1213/heartbeat/deviceList-info/insertDeviceList
2) UI> Get Label List
3) UI: Get DEvice detail for selected labels
4) UI: Get Device detail popup
5) UI: Get Log detail popup
6) Check UI sync functionality. Test Alive status in sync data
7) UI: Get version details
8) UI: Check alert message (res symbol) for Error messages
9) UI: Check Alive symbol for Online: Green and for Offline: Grey symbol
10) 