Tip : Use of tags in command line via bamboo build - Run all tests while sending -T tags parameters
In our CI build pipeline (bamboo) I setup two parameters tagTestSuite and tagTestCase. This way, all our automation testers can specify, if needed, which test cases need to be ran based on certain tags. This works fine if there are indeed such tags passed on. But what if a project just wants to run all of its tests? These -T parameters cannot be left empty in the command line as that fails the build... Deleting them from the bamboo variables will then lose the standardized approach for all testers to do a tag-based execution. Seeing the documentation here (https://support.smartbear.com/readyapi/docs/functional/running/automating/cli.html)I noticed you can provide logical operators. So I thought I came up with a nice solution: I provide as default value for those parameters in bamboo a tag value that nobody would use and by setting the "!" operator in front of it I'd expected thatALL test suites/cases would run. So I've set parameters and resulted in a command line that has these : "-TTestSuite !itShouldRunAllTestSuites" "-TTestCase !itShouldRunAllTestCase". Since none of the testSuite/testCases has a tag "itShouldRunAllTestSuites" or "itShouldRunAllTestCases" I thought my project would be run in full.... But nope: error is shown:[errorlog] java.lang.Exception: The tag "itShouldRunAllTestSuites" was not found. Yes, I could go and add a tag to every single test suite and test case to work around this, but that could be tedious and not so future proof... Solution: ReadyAPI seems to look first for a tag and then complain it wasn't found. So I tried this: I've added the tags "itShouldRunAllTestCases" and "itShouldRunAllTestSuites" to my project but did not tag any of my testsuites/testcases with this tag. Executed above again and now ALL of my tests get's executed nicely!838Views2likes2CommentsRamping up your usage of SOAP UI NG ? Check out our Free weekly Training webinar!
Hello all, Have you recently bought new Ready! API licenses and are about to kick start your API tests? Register here for our Free Weekly interactive Webinar, Next one is on the 7th of September( day after Labor day) What to expect? Advice on getting up and running on your SOAP and REST projects Hidden gems within the tool that you may not uncover on your own Personalized question-and-answer with our API experts If you have 10+ users and would like to get your users on-boarded, please reply to this message and I'll be in touch. Cheers, Katleen B Snr. Customer Success Advisor EMEA kbb(at)smartbear.com1.4KViews2likes0CommentsHow to build SQL query using strings whose value should be retrieved from TestCase property
Suppose i have the following properties defined in the Test Case Properties FromTime =2023-11-15 23:00:00 ToTime =2023-11-16 23:00:00 I want to replace the time given in the below query with the above test case property variables. How to do that in ReadyAPI JDBC datasource ? SELECT * FROM Table1 where TagId = 4314 and Time > '2023-11-15 23:00:00' and Time < '2023-11-16 23:00:00' I am able to retrieve integer values like TagId and use it by adding 'Prepared Properties' within the JDBC datasource window. But if i add the string and use it inside the query, data is not fetched as the string is not interpreted properly.371Views1like7Commentsgcloud authentification with service account
Hi community, we are trying to check our google storage buckets using ready api. For this we need a token to access the gcs. It works on my local machine inserting my personal token directly in the oauth token field but, as you might understand, I don't want this to be stored in any gitlab pipeline or log file. Has any body already gathered experience with connection rap to the google storage, and has come across a solution for automatic token generation?218Views1like0CommentsHow to retrieve oauth2.0 access token for grant type Client Credentials in Groovy
I am using ReadyAPI (version 3.48) and able to manually retrieve the OAuth2.0 Access Token for grant type Client Credentials from this GUI. How can I make thisAccess Tokenretrieval automated by Groovy script so that I could use that token and assign it to a property variable and use in a subsequentREST Request I tried this Groovy script but getting error: (java.lang.NoClassDefFoundError: org/apache/ivy/util/MessageLogger) @Grab(group='org.codehaus.groovy.modules.http-builder', module='http-builder', version='0.7.1') import groovyx.net.http.HTTPBuilder import groovyx.net.http.Method import groovyx.net.http.ContentType def clientId = 'df34a176-4d83-4ebf-82fd-ac6efba39e6a' def clientSecret = 'Yf.vZQuX__l4r2x75E_iqfJl_icH6Nr6.7' def tokenUrl = 'https://login.microsoftonline.com/75056d76-b628-4488-82b0-80b08b52d854/oauth2/v2.0/token' // First, we obtain an access token using the client credentials grant def http = new HTTPBuilder(tokenUrl) http.request(Method.POST, ContentType.URLENC) { req -> body = [ grant_type: 'client_credentials', client_id: clientId, client_secret: clientSecret ] response.success = { resp, reader -> // Extract the access token from the response def accessToken = resp.data.access_token // Now we can use the access token to make API requests makeApiRequest(accessToken) } } // Finally, we can use the access token to make API requests def makeApiRequest(accessToken) { def http = new HTTPBuilder('https://inest-npd.azcpggpc.ca') http.request(Method.GET, ContentType.JSON) { req -> headers['Authorization'] = "Bearer $accessToken" response.success = { resp, reader -> // Handle the API response println resp.data } } }482Views1like1CommentExport to Swagger in ReadyApi
Hi , I am refering to the attached screenshot which is for the documentation about export to swagger from ReadyAPI, and here is the link too. https://support.smartbear.com/readyapi/docs/apis/export.html#export-in-the-openapi-or-swagger-format I wonder why I do not have that feature (Export to Swagger) in my licensed ReadyApi? Can any one help?307Views1like1CommentIntercepting the response(from the actual host) in virtual service to verify if its a negative
Here is my scenario: Create a virtual service that forwards the incoming request to the actual host (always) , Upon receiving the response from actual host, then my virtual service should be able to intercept the response from actual host. Review the response for any errors. If there are errors then return a default(positive) response from within the virtual service. Is this possible to do with service virtualization(readyAPI). If its possible, what options I can go with ?Solved419Views1like3CommentsHow to not crash ReadyAPI on a request with a lot of data, like a general "get all customers" call
Hello, I'm trying to use Smart Assertions in ReadyAPI to easily check for correct data on a response. My problem is that trying to create a Smart Assertion on an endpoint with a response containing a lot of data just straight up leaves ReadyAPI unresponsive and breaks the UI. Is there any way to make Smart Assertions on big general endpoints not completely softlock the application?622Views1like5Comments3.44 issue with java.net.SocketTimeoutException: Read timed out
test step is failing due to "java.net.SocketTimeoutException: Read timed out", we tried increasing the socket timeout but it is still failing after the default 1 minute time. this project and test step is working fine when using 3.41 readyapi version but same test is failing in 3.44 and the latest 3.45 versions. please let us know what need to be done here as this impacting our regression testsSolved1.4KViews1like2Comments