- Last Active
- Members, Staff
Please be aware that a system may have multiple NICs and each NIC may have multiple IP addresses assigned to it. Depending on your requirements, you may need to check all of those and pick the IP address you think you want to use. The script from the previous post is for python (Jython). In contrast, there are java APIs for collecting IP addresses which you could call from a Groovy script. In particular, there is java.net.NetworkInterface.getNetworkInterfaces() which returns the list of network interfaces. For each network interface, you can call java.net.NetworkInterface.getInetAddresses() to get the list of IP address for that network interface.
There are plenty of examples on the web for using the Java APIs I mention. For example:
From the "Form Input View Options" section of the SOAtest User's Guide, which applies to Form JSON view as well:
To have values stored in a data source dictate whether a value is sent for an optional element:
1. Right-click the element’s tree node.
2. Choose Use Data Source> Exclude Element with Empty String.
3. In the tool configuration panel, ensure that the appropriate data source column is selected under Use data source: Exclude with empty string.1
Use "report.mail.cc" to specify list of emails for manager reports. SOAtest generates manager reports which are comprehensive. However, it also generates individual reports containing failures based on test/task authorship settings. I've always used "report.mail.cc" to control who gets the manager reports.1
A couple things to keep in mind. Please be aware that backslash is an escape character in JSON. When you extract a JSON string value, like with a JSON Data Bank, then any JSON escape sequences are automatically decoded. You don't need to do this manually by script or something. For example, backslash-double-quote (\") would automatically become a double-quote ("), backslash-t (\t) with the tab character, double-backslash (\\) with a single backslash (\), etc. The data bank column will have the logical string value, not way it needed to be encoded within a JSON document.1
Do not enable HTTP authentication in your test if the error is from your HTTP proxy server. Let's use thread 7853 for any questions about how to configure HTTP proxy authentication.1