test framework - the OPEN

Download Report

Transcript test framework - the OPEN

Version 0.1
Draft – For Review
Murali Mohan Murthy



Project Name: SDN-O
Project Repository name: <TBD LF to put a
common github url>
Project Description
 Provide
the test framework to validate the SDN-O use
case scenarios.
Develop a test framework to help integrate SDN-O services
(Each SDN-O module) and validate usecase scenarios
(E2E-End to End) without any external dependency with
minimum effort.


Project Name: SDN-O
SDN-O Release 1 Test Framework Features and Functionality

Framework APIs should able to help contributors to write simple tests to validate all
the usecases for each of the SDN-O services and integrate them.

Framework should support replacing heavy weight external components such as
controllers, databases with light weight or simulated components to support End to
End independent testing.

Framework should support to build SDN-O inventory as per the usecase and based
on topology inputs.

Framework support GUI of “New Postman Tool” for easy execution of manual
testing.

Framework should support continuous integration (CI) of automated test cases and
generate simple test report to ensure the sanity of code .

Stretch Goals:

Simple Test case management (Import/Export).
GUI (10%)
End to End (30%)
Interface (60%)
PASS
FAIL
Request JSON | Response JSON
TESTCASE FILE

TEST CODE:


Build topology as per external input.
Read JSON from file and replace
values , send request and validate
response and output PASS/FAIL.


MOCO-MASTER: 2
Controller Simulator to validate SBI
request and respond for standalone.
1
1
TEST CODE
DATA
STORE
1
MY SQL
SDN -O
2
TO ADAPTER
REST SBI
HTTP CLIENT WRAPPER
PREPARE TOPO
READ JSON
1
TEST
CODE
STUB
SERVER(Co
ntroller )
NE Name | IP Address | Owner | Desc
INVENTORY CSV FILE
1
PREPARE TOPO
TEST CODE
1
BRS
DATA STORE
TEST
Framework
CODE
TOPOLOGY
DATABASE

SDN-O will implement Topology builder





Deploy Topology
Un-deploy topology
Export topology
Import topology
Prepare topology
Before/After
Test suite
Generate test
interface files
Test Case Flow:

Select the interface to be tested and corresponding
JSON and topology.
Select inputs

Modify inputs for the interface to be tested.
Modify inputs

Set up Stub server and set the response for the
requests to be stub (Such as controller and other
external components) by reading topology file and
other configuration.

Send the modified request to Server (under test) and
get the response.

Validate the response and assert Pass/Fail and
generate simple report.

Repeat the flow for another test cases
Set-up Stub server
Execute Test case
Validate Test result
Generate Report
Each Test Case
CI
(Jenkins)
Contributor


SDN-O
Test Cases

API (s)

Http Client
Wrapper
TopoBuilder

Test File
Loader
Config
Loader
Selenium
API
Report
Generator
Test
Utility
Test
Validator


Test Framework

MOCO- MASTER
Test Scripts
Other Test Scripts

Simple Http client wrapper to support send and
receive REST APIs and support authentication.
Topology builder takes input (topology blue
print) and generates SDN inventory.
Test File loader reads the input test JSON,
replaces the inputs and provides expected
output (if any).
Test Validator validates the output based on the
expected output .
Report generator generates simple report after
the entire test suite is completed.
Selenium APIs are used to test the GUI use
cases.
Test Utility contains APIs to transfer files,
access database, export/import files, support
remote login and other utilities.
Moco-master scripts to simulate the SDN
Controller.
Other Test scripts to support H2Database
integration and support automation, continuous
integration.
Import to PostMan