Skip to content

Commit e9c44a8

Browse files
author
Amanda Butler
authored
Edit README.md
Edit file, mostly for inclusion of articles.
1 parent 629e8a0 commit e9c44a8

File tree

1 file changed

+45
-47
lines changed

1 file changed

+45
-47
lines changed

TESTS/network/interface/README.md

Lines changed: 45 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,21 @@
1-
Network Interface test plan
1+
Network interface test plan
22
========================
33

44
Target API
55
----------
66

7-
The target for this plan is to test:
7+
The goal of this plan is to test [NetworkInterface.h](https://github.com/ARMmbed/mbed-os/blob/master/features/netsocket/NetworkInterface.h)
88

9-
- [NetworkInterface.h](https://github.com/ARMmbed/mbed-os/blob/master/features/netsocket/NetworkInterface.h)
10-
11-
Tools to be used
9+
Tools needed
1210
----------------
1311

1412
- Mbed OS.
15-
- Standard Mbed OS development tools as described in [Arm Mbed tools overview](https://os.mbed.com/docs/latest/tools/index.html).
13+
- Standard Mbed OS development tools as described in the [Arm Mbed tools overview](https://os.mbed.com/docs/latest/tools/index.html).
1614

1715
Test environment
1816
----------------
1917

20-
- [Greentea](https://os.mbed.com/docs/mbed-os/latest/tools/greentea-testing-applications.html)
18+
[Greentea](https://os.mbed.com/docs/mbed-os/latest/tools/greentea-testing-applications.html).
2119

2220
Test case priorities
2321
--------------------
@@ -59,8 +57,8 @@ mbed test --compile -t <toolchain> -m <target> -n mbed-os-tests-network-interfac
5957
Running tests
6058
-------------
6159

62-
When device is connected to network, or in case of wireless device near
63-
the access point.
60+
When device is connected to network, or if a wireless device is near
61+
the access point:
6462

6563
```.sh
6664
mbed test -n mbed-os-tests-network-interface
@@ -75,19 +73,19 @@ Test cases for NetworkInterface class
7573

7674
Test `NetworkInterface::connect()` and `NetworkInterface::disconnect()`
7775

78-
**Preconditions:**
76+
**Precondition:**
7977

80-
1. Network interface is initialized.
78+
Network interface is initialized.
8179

8280
**Test steps:**
8381

84-
1. Connect interface
85-
2. Disconnect interface
86-
3. Repeat connect and disconnect steps 1 to 2 four times
82+
1. Connect interface.
83+
2. Disconnect interface.
84+
3. Repeat connect and disconnect steps 1 to 2 four times.
8785

8886
**Expected result:**
8987

90-
`Connect()` and `disconnect()` calls return NSAPI_ERROR_OK.
88+
`Connect()` and `disconnect()` calls return `NSAPI_ERROR_OK`.
9189

9290
### NETWORKINTERFACE_STATUS
9391

@@ -97,49 +95,49 @@ Test `NetworkInterface::attach()` and status indications.
9795

9896
**Preconditions:**
9997

100-
1. Network interface is initialized
101-
2. Status callback is attached to network interface
102-
3. Network interface is on blocking mode
98+
1. Network interface is initialized.
99+
2. Status callback is attached to the network interface.
100+
3. Network interface is on blocking mode.
103101

104102
**Test steps:**
105103

106-
1. Connect interface
107-
2. Check that interface indicates status NSAPI_STATUS_CONNECTING
108-
3. Optional: check that interface indicates status NSAPI_STATUS_LOCAL_UP (whether this is indicated depends on network interface type)
109-
4. Check that interface indicates status NSAPI_STATUS_GLOBAL_UP
110-
5. Disconnect interface
111-
6. Check that interface indicates status NSAPI_STATUS_DISCONNECTED
112-
7. Repeat connect and disconnect steps 1 to 6 four times
104+
1. Connect interface.
105+
2. Check that interface indicates status `NSAPI_STATUS_CONNECTING`.
106+
3. Optional: Check that interface indicates status `NSAPI_STATUS_LOCAL_UP` (whether this is indicated depends on network interface type).
107+
4. Check that interface indicates status `NSAPI_STATUS_GLOBAL_UP`.
108+
5. Disconnect interface.
109+
6. Check that interface indicates status `NSAPI_STATUS_DISCONNECTED`.
110+
7. Repeat connect and disconnect steps 1 to 6 four times.
113111

114112
**Expected result:**
115113

116-
Callback statuses are correct. `Connect()` and `disconnect()` calls return NSAPI_ERROR_OK. Note: network interface may indicate same status several times a row depending on network interface type. This will not fail the test.
114+
Callback statuses are correct. `Connect()` and `disconnect()` calls return `NSAPI_ERROR_OK`. Note: The network interface may indicate the same status several times in a row, depending on the network interface type. This will not fail the test.
117115

118116
### NETWORKINTERFACE_STATUS_NONBLOCK
119117

120118
**Description:**
121119

122-
Test `NetworkInterface::attach()` and status indications on non-blocking mode.
120+
Test `NetworkInterface::attach()` and status indications on nonblocking mode.
123121

124122
**Preconditions:**
125123

126-
1. Network interface is initialized
127-
2. Status callback is attached to network interface
128-
3. Network interface is on non-blocking mode
124+
1. Network interface is initialized.
125+
2. Status callback is attached to the network interface.
126+
3. Network interface is on nonblocking mode.
129127

130128
**Test steps:**
131129

132-
1. Connect interface
133-
2. Check that interface indicates status NSAPI_STATUS_CONNECTING
134-
3. Optional: check that interface indicates status NSAPI_STATUS_LOCAL_UP (whether this is indicated depends on network interface type)
135-
4. Check that interface indicates status NSAPI_STATUS_GLOBAL_UP
136-
5. Disconnect interface
137-
6. Check that interface indicates status NSAPI_STATUS_DISCONNECTED
138-
7. Repeat connect and disconnect steps 1 to 6 four times
130+
1. Connect interface.
131+
2. Check that interface indicates status `NSAPI_STATUS_CONNECTING`.
132+
3. Optional: Check that interface indicates status `NSAPI_STATUS_LOCAL_UP` (whether this is indicated depends on network interface type).
133+
4. Check that interface indicates status `NSAPI_STATUS_GLOBAL_UP`.
134+
5. Disconnect interface.
135+
6. Check that interface indicates status `NSAPI_STATUS_DISCONNECTED`.
136+
7. Repeat connect and disconnect steps 1 to 6 four times.
139137

140138
**Expected result:**
141139

142-
Callback statuses are correct. `Connect()` and `disconnect()` calls return NSAPI_ERROR_OK. Note: network interface may indicate same status several times a row depending on network interface type. This will not fail the test.
140+
Callback statuses are correct. `Connect()` and `disconnect()` calls return `NSAPI_ERROR_OK`. Note: The network interface may indicate the same status several times in a row, depending on the network interface type. This will not fail the test.
143141

144142
### NETWORKINTERFACE_STATUS_GET
145143

@@ -149,18 +147,18 @@ Test `NetworkInterface::get_connection_status()`.
149147

150148
**Preconditions:**
151149

152-
1. Network interface is initialized
153-
2. Network interface is on blocking mode
150+
1. Network interface is initialized.
151+
2. Network interface is on blocking mode.
154152

155153
**Test steps:**
156154

157-
1. Check that `get_connection_status()` returns status NSAPI_STATUS_DISCONNECTED
158-
2. Connect interface
159-
3. Poll the `get_connection_status()` until it returns status NSAPI_STATUS_GLOBAL_UP
160-
4. Disconnect interface
161-
5. Check that `get_connection_status()` returns status NSAPI_STATUS_DISCONNECTED
162-
6. Repeat connect and disconnect steps 2 to 5 four times
155+
1. Check that `get_connection_status()` returns status `NSAPI_STATUS_DISCONNECTED`.
156+
2. Connect interface.
157+
3. Poll the `get_connection_status()` until it returns status `NSAPI_STATUS_GLOBAL_UP`.
158+
4. Disconnect interface.
159+
5. Check that `get_connection_status()` returns status `NSAPI_STATUS_DISCONNECTED`.
160+
6. Repeat connect and disconnect steps 2 to 5 four times.
163161

164162
**Expected result:**
165163

166-
`Connect()` and `disconnect()` calls return NSAPI_ERROR_OK. Right status is returned by `get_connection_status()`.
164+
`Connect()` and `disconnect()` calls return `NSAPI_ERROR_OK`. The right status is returned by `get_connection_status()`.

0 commit comments

Comments
 (0)