can katalon automation recorder be used to manipulate http post parameters - http

I am using Katalon Automation Recorder to Automate testing a web service my company is developing.
I have been asked to manipulate the HTTP POST protocol parameters submitted to the server when the Submit button is clicked.
This is because my boss doesn't want the test suite to enter values in their designated text box, but instead, edit the code we can see in the source such that the data sent to the server is what we want and can enter, just without using the text boxes for that said data.
I don't know if it is possible to do this using Katalon Recorder and I need someone to tell be definitively, if I can and what command, target and value I am required to enter to achieve this.

It is available in Katalon Studio since version 5.4. Please check it here: https://docs.katalon.com/display/KD/Parameterize+a+Web+Service+object

Related

How to trigger a php file with Kotlin?

I have to put into a mysql database on a remote server an int 1 and 0, depends on an external request.
I wrote two php files and put them on the remote server.
on.php
off.php
I can trigger them through my web browser like: "https//www.anysite.com/temp/on.php"
I have to do the same on my android app what I'm writing in Android Studio.
I tried many possible options to achieve my need but without any success.
In my Android app I have two buttons, one is the "On" the second is the "Off" button.
Depends on which button is pressed that php file should be loaded/triggered.
I don't have to pull any data out.
Practically I need help to make a working http request what in my case looks like a horrible nightmare to achieve.
Any help or suggestions or example I would really appreciate.
Thank you.
I tried various libraries but all of them are failed.
Most of time I focused to use Retrofit and Fuel libraries.

Get API response under the Network Tab of Browser using Karate [duplicate]

I am writing UI automation script using karate DSL. In this at certain point I need to get value from network call in chrome. I want to interact with one of the webservice call in chrome devtools network tab and get the json response of that webservice.
I need this because I have to extract the value from that particular call and pass it on to the next step in my automation script.
I have seen the question related to sessionStorage(Is there a way of getting a sessionStorage using Karate DSL?) but I wonder how to do the same for network call using script command or any other way?
The first thing I would recommend is don't forget that Karate is an API testing tool at its core. Maybe all you need to do is manually make that call and get the response. You should be able to scrape the HTML and get the host and parameters needed.
That said - there's a new feature (only for Chrome) which is documented here: https://github.com/intuit/karate/tree/develop/karate-core#intercepting-http-requests - and is available in 0.9.6.RC2
It may not directly solve for what you want, but in a Karate mock, you should be able to set a value for use later e.g. by using a Java singleton or writing to a temp-file.
If there is something oddly more specific you need, please contribute code to Karate. Finally, there is an experimental way in which you can actually make raw requests to the Chrome DevTools session: https://github.com/intuit/karate/tree/develop/examples/ui-test#devtools-protocol-tips - it is for advanced users, but maybe you are one :)

How can I use SonarQube web service API for reporting purpose

I want to create a custom report. Response format for sonarqube web service API /api/issues/search is JSON or XML. How can I use that response to create a html or CSV file using "unix shell without using command line tools" so that I can use it as a Report. Or is there any other better way to achieve this?
you can generate a html file if you run an analysis in the preview mode http://docs.sonarqube.org/pages/viewpage.action?pageId=6947686
It looks as if the SonarQube team has been working hard to not allow people to do this. They appear to want people to purchase an Enterprise Subscription in order to export reports.
An old version of sonar-runner (now called sonar-scanner) had an option to allow local report output. But that feature is "no more supported".
ERROR: The preview mode, along with the 'sonar.analysis.mode' parameter, is no more supported. You should stop using this parameter.
Looks like version 2.4 of Sonar Runner does what you want. If you can find it. Of course they only have 2.5RC1 available on the site now.
Using the following command should work on version 2.4:
sonar-runner -Dsonar.analysis.mode=preview -Dsonar.issuesReport.html.enable=true
There at least two open-source projects that query the SQ API to generate reports in various formats.
https://github.com/cnescatlab/sonar-cnes-report/tree/dev (Java)
https://github.com/soprasteria/sonar-report (JavaScript/Node)
At the time of writing both are active.

How can I code my web app so that it knows what web server it's on?

My company has an ASP.NET web app that runs on a web farm that's load balanced by Enterprise Foundry ServerIron XL 8 hardware. For debugging purposes, we've got a page that just reports what server it's running on. Currently, we manually copy a different version of this page to each server, and hardcode the name of that server (e.g. www1, www2, or www3). What I'd like instead is to find a way for the app to determine this information itself, so we don't have to do this manual step, outside of the code itself, but I can't find any way to accomplish this.
So the question is: how can an ASP.NET app be made aware of where it's actually running?
You can do this via IIS itself.
Find the web application. In the app's main config page (features view), under IIS section you'd find HTTP Response Headers. This feature enables you to add/remove headers which need to be sent along with every response of that application.
However, you'd need tools like fiddler to be able to inspect such data.
Another option is a custom server control or user control, placed anywhere within a page which will output that information during it Render phase (as html comment). You can get using System.Environment class.
var mc_name = System.Environment.MachineName;

Flex Write File

I checked in the API, that writing a file is only in Flex Air.
Despite of that, is there still a way in Flex to write a file on the server or on the client machine ?
More concretely, it's because I have a String and I will decode it by mx.utils.Base64Decoder
to a doc. And I need to open it by Word directly on the client side, or write it on the server and return the link to the client for downloading.
Thanks
I'm doing something similar - I have built a custom grid in Flex that contains an additional button on it that allows the user to open the data up in Excel. I've done this by writing a function in PHP on the server which my Flex speaks to. This creates the CSV file on the server and the function passes the link back to the client, which in turn offers the user the chance to open the data up in Excel.
I'm using the Zend technologies to accomplish this - I recommend you take a look; they're extremely good. I used to use Flex Data Services and Java do do this but just recently switched to PHP because development time is cut down drastically as a result.
Hope this helps.
Jamie.
AIR applications run on the users' desktops. They allow you to write to the users' desktops. Nothing stops Flex/AIR applications from communicating to the server, write some files there (using a suitable backend technology) and return a link back to the user.

Resources