Socket API test editor overview
You use the test editor to inspect or customize a socket API test that you recorded.The test editor lists the connections and data exchanges for a test as they occurred during the recording.
The test editor window has two main areas. The area on the left, Test Contents, displays the flow of the socket events that constitute the test. The area on the right, Test Element Details, displays details about the currently selected test element in the test hierarchy. Values can sometimes be highlighted in green. This highlighting indicates that these requests contain one or both of the following types of information:
- A datapool candidate: This is a value, usually one specified by the tester during recording, that the test generator determined is likely to be replaced by values in a datapool. An example of a datapool candidate is a string that you search for in a recorded test. The string is highlighted as a datapool candidate on the assumption that, before playback, you might want to associate the string with a datapool column containing appropriate substitute values.
- Correlated data: These are values in a test, usually one of them in a response and the other in a subsequent request. An example is a product price returned to the browser by a test that searches a product database. You can use these values as references that can be reused later in the test. Suppose that, before running the test with many virtual users, you replace RPTv8 name searched for in the recorded test with names in a datapool. Because the test correlates the data, each virtual user searches for a different product, and the server returns an appropriate price.
To see an illustration of color coding in performance tests or to change the color settings, click Window > Preferences > Test > Fonts and Colors.
Click Add to add elements to the selected test element. Alternatively, you can right-click a test element, and select an action from a menu. The choices that you see depend on what you have selected.
For example, after you select a test, you can add a new event.
The Insert button works similarly. Use it to insert an element before the selected element. Use the other buttons (Remove, Up, Down) primarily when you substantially modify a test.Tip: Performing actions with these buttons or choices are likely to break a recorded test. The types of structures that are commonly used in recorded tests are explained in Add elements to a socket API test.
Sometimes, the area of the editor where you need to work is obscured. To enlarge an area, move cursor over one of the blue lines until cursor changes shape to a vertical line with an up arrow at the top and a down arrow at the bottom, and drag up or down while holding the left mouse button.
Display binary data
With the Socket Details view, you can display the binary data for send and receive elements in the test. The text area of the Socket Details view supports many international character encoding standards.
To open the Socket Details view, right-click a socket send or receive element, and click Show Socket Details.
In the test log, the Socket Details view also displays actual the actual binary data sent and received during a test run.
Manipulating elements in the socket test editor
Socket tests are often made of a long series of send and receive elements to or from various connections. The test editor helps you to locate specific elements and to manipulate certain types of elements in the test editor. The following examples demonstrate how you can select and manipulate large sets of test elements:
- To select all the send or receive elements in the test: Click the Select button and click Socket Send or Socket Receive.
- To locate all the connections in the test: Click the Select button and click Socket Connection.
- To disable or remove all send and receive actions to or from a specific connection: Right click a test element, click Manage Socket Connections, click Only disable them, and select the connections to disable or remove.
- To reenable all disabled send and receive actions to or from a specific connection: Right click a connection element, click Select All Related Actions, right-click again, and click Enable.
Related
Socket API performance testing overview Socket performance testing guidelines
Related tasks
Record socket tests Merging socket send and receive elements Change multiple socket send and receive elements Add elements to a socket API test