Contributions
Re: Parameterising JDBC Connection Settings..Can you do it?
Hey man, The password was never parameterised - the right click context menu doesn't include a 'Get Data' option on the password field - which further raises the question for me - what's the point of being able to parameterise the other details (Connection String, Driver fields) if you can't parameterise the Password field value? Surely that means - you can't parameterise any JDBC test step? As I said in original post - I'm using the approach you showed me to handle multiple environments - specify values in an environment specific custom project level properties file - and then just load in whichever file corresponds to the environment you're testing in - but if you can't parameterise the DB user's password - it kinda invalidates parameterising the other DB connection details. I might raise a ticket with SmartBear and see what they say. Thanks man - appreciate you looking at this for me, rich2Views0likes0CommentsRe: GroovyScript Help - Repeating JSON Attributes Have Specific Value.....some of the time?
nmrao straight up - can't thankyou enough - you always help me out when I need. really appreciate that you explained it all as well - means I can re-use in other situations. you are a life saver! ;) Cheers! rich8Views0likes0CommentsGroovyScript Help - Repeating JSON Attributes Have Specific Value.....some of the time?
Hey! Ok - so I've got GET request with multiple different query parms -one of these query parms is 'handling_codes'. The GET returns a JSON response payload that contains multiple 'CONSIGNMENT' records. Each of these CONSIGNMENT records has a handling_code array. (JSONPATH = $.data[0].handling_codes ). Each CONSIGNMENT record in the response payload can have ZERO or multiple handling_code values, and if they exist, are specified by the 'code' name/value pair attribute (JSONPATH = $.data[1].handling_codes[0].code) if I specify the handling_code = 'SPX' as my query parm on the GET request, then the records in the payload response will include CONSIGNMENT records that have at least 1 $.data[1].handling_codes[0].code = 'SPX', but could include handling_code.code values that are <>'SPX' The records may have other handling_code.code values <> 'SPX', but the rules are as long as at least 1 handling code for the parent CONSIGNMENT record includes 'SPX', then the record is returned in the response. Ages back nmrao gave me a groovy snippet to iterate through a payload and asserting that a specific JSON attribute had a specific value - i.e. value of '12345' - such as below def json = new groovy.json.JsonSlurper().parseText(context.response) assert JSONPATH_to_relevant_attribute.every{it == 12345} HOWEVER - I can't use this because some of the handling_code.code values will NOT equate to 'SPX' - I need to create an assertion that verifies that if the GET request's handling_code query parm = 'SPX', the generated list of consignment records includes at least one handling_code of 'SPX', despite how many other handling_codes it may have. I've added an example payload below (with a massive amount stripped out) so you can see the general structure and JSONPATH of the payload. There are 3 consignment records in the example. 1 consignment has 5 handling code values, 1 consignment has zero, and 1 consignment has 1 handling code specified. I'll repeat - if the handling_code query parm is set to 'SPX' - then a consignment will be retrieved if it possesses a handling_code.code which is equal to 'SPX', but it will also retrieve consignments that have handling_code.code values <> 'SPX' as long as one of them is equal to 'SPX'. { "meta" : { "total" : 3 }, "data" : [ { "$uri" : "/v2/consignments/546be556-eb68-48f9-9f82-ca0e9b9d4e6f", "exceptions_count" : 3, "handling_codes" : [ { "code" : "BUC", "description" : null }, { "code" : "SPX", "description" : "COOL GOODS" }, { "code" : "HEA", "description" : "HEAVY CARGO 150 KG. AND OVER PER PIECE" }, { "code" : "PER", "description" : "PERISHABLE CARGO" }, { "code" : "MGO", "description" : null } ], "has_exceptions" : true, "updated_by" : "a74dfe57-37ef-4b1b-9801-167bfda17d59" }, { "$uri" : "/v2/consignments/3bacb93c-24b3-4989-8048-fe4791706593", "exceptions_count" : 0, "handling_codes" : [ ], "has_exceptions" : false, "updated_by" : "a74dfe57-37ef-4b1b-9801-167bfda17d59" }, { "$uri" : "/v2/consignments/7555fbb3-7ca3-4166-b243-cf8813d376ef", "exceptions_count" : 0, "handling_codes" : [ { "code" : "SPX", "description" : "ON PAX A/C ONLY" } ], "has_exceptions" : false, "updated_by" : "a74dfe57-37ef-4b1b-9801-167bfda17d59" } ] } To repeat --> I need to create an assertion that verifies that if the GET request's handling_code query parm = 'SPX', the generated list of consignment records includes at least one handling_code of 'SPX', despite how many other handling_codes it may have - hence that if a consignment record does NOT include a handling_code of 'SPX' then it isn't retrieved in the response. Can anyone help? I just don't know where to start with this - I can write the pseudo code - but that's about it and I don't even know if I'm on the right track with that I've attached a genuine response file (generated using the GET with handling_code = SPX query parm set) for a more accurate example Cheers - as always I appreciate all/any help anyone can give me! RichSolved18Views0likes3CommentsRe: Parameterising JDBC Connection Settings..Can you do it?
Hey nmrao An error is reported "SQLException: Access denied for user 'DB_user' @ 'IP Address' (using password: NO)" - so it's ignoring the password value populating the password field (the password field doesn't include the 'Get Data' capability - when I right click in the password field - the context menu that launches doesn't include the 'Get Data' option). At this point, if I click on the 'Configure' button immediately below the 'Password' field' - the following 'no matching template' dialogue is launched which once the 'OK' button is selected to close the 'Error' dialogue - the 'Database Configuration' form is automatically launched. I'm guessing 'template' is the RDBMS option (SQLServer? Oracle? PostGres, MySQL) - but it's not even recognising the previously connected mySQL connection (that was set in the 'Configuration' section of the JDBC test step form). If I click 'OK' on the 'No matching template' dialogue - it then launches the 'Database Configuration' form (see below) Cheers! Rich0Views0likes0CommentsParameterising JDBC Connection Settings..Can you do it?
Hi, I'm trying to create a project that I can lift and shift between environments no matter the data in the underlying database - so I need to parameterise anything that is environment specific but i'm struggling with the JDBC steps. The summary of my question is --> how are people parameterising their JDBC Test Step connection details so they don't have to edit the content of EVERY SINGLE JDBC TEST STEP when they switch to a different environment? Please see below for what I've tried. Ages back nmrao showed me a way of storing all environment specific variables at project level using an environment specific properties file which works except for my JDBC connection settings. i.e. create a 'QA_properties' file that looks like the following: EnvironmentDomainHost=https://platform.www-whatever.net Authorization_HeaderParm=eyJhbGciOiJIUzI1NiIsInR5cC X-Auth-Key_AdminHeaderParm=8b0d7bf2-9aa3-4e29-8b4e-79a4c7bde384 X-Auth-Key_HeaderParm=8683f790-18de-4906-a65b-67565d18c676 JDBC_Driver=com.mysql.jdbc.Driver JDBC_Host=104.211.13.14 JDBC_Port=3306 JDBC_DB=mab_user JDBC_User=ulo_user JDBC_Password=thisIsNotTheRealPassword JDBC_ConnectionURL=jdbc:mysql://whatever:3306/db?user=xxxUser So database I need to connect to is mySQL v8. I've downloaded JDK17, I've installed the mySQL v8 driver file and copied it into the correct /Program Files/ReadyAPI!/bin/ext directory and confirmed the connection works. First thing - when I select the correct PREVIOUSLY created connection my JDBC test step I was expecting the 'Driver' the 'Connection String' and the 'Password' to be auto populated with the details already set in my Database Connections function - didn't this auto populate before? Because those fields aren't populated - I decided to use the 'Get Data' function that is available and pick up the relevant values from my custom project properties (sourced from the 'QA_properties' file - see above) - so it appears as follows: The 'Get Data' function appears to let me point to a parameter value stored elsewhere - however - if I try running the query or testing the DB connection - it fails. I think there might be a couple of defects that is hindering me being able to do this - I'm pretty sure one earlier versions of ReadyAPI a couple of years ago auto populated the 'Driver' 'ConnectionString' and the 'Password' fields once the pre-existing DB connection was set. I don't remember trying to parameterise the DB Connection details before now - HOWEVER - why include functionality that supports parameterisation with the Get Data function and allow me to point to a custom project property if it's not allowed? Can anyone advise? How would any one else here parameterise a JDBC Test Step in a project so that when lifting and shifting their ReadyAPI! project to a different environment they don't have to edit EVERY Single JDBC test step? I'm gonna have hundreds and hundreds of tests and virtually every single one of those will require a JDBC test step. Yes I would like to use REST as an alternative - but there are no native REST APIs supporting querying mySQL (unlike stuff like Azure DB, etc.). I'd need a developer to code a REST API to support this. Cheers, Rich31Views0likes5CommentsRe: ReadyApi-Truncated Response limited to 10000 bytes
Hey vikasloud a 422 response indicates there's client error with the request content - obviously it depends on how your coders have implemented http handling but if they're following the standard HTTP RFC's for http response codes, you get a 400 for a malformed (syntactically incorrect) request and a 422 for invalid (schema invalid) requests. So I'd double check the content of the request you are submitting to cause a 422 response. However - you do mention that your request works with Postman, but doesn't with ReadyAPI so this gives us another avenue for analysis of your issue. The first thing I do whenever I have this ReadyAPI! / Postman incongruency (i.e. it works in Postman, but not in ReadyAPI!) is to compare the HEADERS of the request and the response. Essentially if the request works in Postman, but doesn't in ReadyAPI!, then I make changes to the ReadyAPI! request to match the Postman request. Most of the time when I've come across this Postman/ReadyAPI! inconsistency is to check the headers. More often than not - that's where the issue lies - fixing the cause of the header inconsistency fixes the overall problem. If you screenshot the RAW request/response from Postman and ReadyAPI!, forum members will be able to provide more help. Just need to emphasise - publishing this sort of stuff ISN'T a security concern as long as you do NOT provide the host associated with your request. Without the host/domain associated with your request, nefarious evil doers can't do anything. Naughty people cannot do anything if they haven't got the host/domain associated with your request - even if you publish every other detail (including all the config for authentication/authorisation). If you do provide screenshots of the RAW request/response details of Postman/ReadyAPI! - remember the host/domain value is included - so just edit this out in the image and you'll be golden! Cheers, rich0Views0likes0CommentsRe: Encrypt Usernames and Passwords in REST API, check in code in Azure(ADO) with encrypted files
Hey Charan960 I'm going to need to do this myself in a couple of weeks using Gitlab and searched the board and found some links that might help. Have a look at the following: https://community.smartbear.com/discussions/readyapi-questions/encrypt-usernames-and-passwords-in-soapui-check-in-code-in-bitbucket-with-encryp/181037 https://support.smartbear.com/readyapi/docs/testing/best-practices/secure.html?_ga=2.254462989.408986045.1707858228-1178484788.1700177028 https://community.smartbear.com/discussions/readyapi-questions/soapui-project-keystore-password-security/181314 cheers, Rich3 months agoPlace ReadyAPI QuestionsReadyAPI Questions14Views0likes1CommentRe: Not asking for help...
well ChrisAdams & nmrao - I'm on a new contract and theyve agreed with my recommendations for the test team to buy ReadyAPI! licenses, so the whole team's gonna have questions. Gimme a couple of weeks and I'll no doubt be needing a shedload more groovy help from you guys - I mean let's face it - the only groovy I know is the stuff you've already shown me! ;) Cheers! rich4 months agoPlace ReadyAPI QuestionsReadyAPI Questions16Views0likes1CommentRe: Reat API Zephyr enterpise Integration
Hi SRIDZQ44 I'm currently investigating. ReadyAPI!/Zephyr Squad/GitLab for Automation and CI/CD capability and although i'm focusing on Zephyr Squad Jira plugin rather than Enterprise, the reading i've been doing indicates integration is possible. Have a look at the following links to start you off. https://smartbear.com/test-management/zephyr-enterprise/integrations/ The next link is peculiar to Zephyr Squad, NOT Enterprise, HOWEVER, there might be info in there that can help your overall understanding. I've found thr Smartbear support pages are poor....orphaned links, links launching 404s, file download links that are kist display html text rather than providing file download capability, collapsible html tables that expand only briefly and don't remain expanded. Essentially i think all the problems with the support help pages are cos i think that Smartbear scraped the original help pages (Atlassian owned Zephyr before Smartbear), but didn't bother to test the completed web pages after the scraped content was pasted back into the page. Hence the reason i've had to revert to reading all the old Atlassian help pages as well as everything else. There is erroneous info in there, but it has helped me progress Cheers, Rich4 months agoPlace ReadyAPI QuestionsReadyAPI Questions2Views0likes0Comments