JMeter examples with scripts - jmeter

I am going to write the first JMeter application to test the new mobile apps and desktop web application.
I see the tutorials on tutorialpoints.com. I want the more advanced examples, e.g. user go to the website and then click some buttons and save to db and refresh the page.
Capture all these events and I believe I need to write some scripts.
Is there any examples that I can reference??

The only good "examples" I can think of you should already have given you obtained JMeter by downloading and unpacking the bundle.
The examples are available via File -> Templates entry of the JMeter Main Menu:
Also you can find the corresponding .jmx scripts under bin/templates folder of your JMeter installation. Check out How to Save ‘Loads’ of Time Using JMeter's Template Feature article for more information on how to use existing and create new templates.
You can also try looking for examples i.e. on Github like this or this one, but they are not guaranteed to work.

Related

How to make a Download BLOB column in Classic Report that has a Web service as Source (using SQL)

I am trying to consume my own file REST service in Oracle Apex (v.19.2) using apex_web_service.make_rest_request in a WITH_PLSQL call as the Classic Report source.
My POST and GET REST calls works fine, but I fail to define the parameters for the 'Download BLOB' column in my Classic Report, such that users can download files.
I am currently clueless to what to do...
(I have no problems with all other processes with consuming numerous other ORDS REST services, it is just the files download that is the problem). Thanks in Advance!
The declarative BLOB download in classic (or interactive) reports do not work for reports on top of Web Source Modules. The reason is that the BLOB would first need to be downloaded to the APEX engine, and from there to your browser - which is pretty inefficient.
In most cases, there are separate REST endpoints to download the actual file contents. If these endpoints can be accessed from the browser, I would simply build a Link Column, in which the link to the "file download" button is constructed. When the end user clicks that link, the browser downloads the file, bypassing APEX.
If that does not work and you need to download the file to APEX, and from there to the browser, you would need to use custom PL/SQL code. This article illustrates this nicely (see the "Download" section):
https://blogs.oracle.com/oraclemagazine/better-file-storage-in-oracle-cloud
I hope this helps

Where is my exposed root of my webpage in the directory structure of Azure console?

I created a new .NET based web application named shabang using the web client and it displays the default woohoo-page when I browse to shabang.azurewebsites.net. Then, I discovered that there's a console in the web client and when I use it, I can see a directory structure including my login name, home directory etc. However, I can't find the files being served and, since I can see a web page being rendered when browsing, I'm certain they are there, somewhere.
Where is the (or equivalent of) wwwroot?
I've googled it but it's a bit hard to word what I'm asking in a way that Google will understand. Just a bunch of guides that are way too advanced to distill the information from.
By default, it is d:\home\site\wwwroot. It can also be modified using the Azure Portal.
Note that you should use the Kudu Console to see it. e.g. https://shabang.scm.azurewebsites.net

Jetbrains REST API to move projects

I am trying to use the TeamCity REST API of JetBrains as shown in http://confluence.jetbrains.com/display/TCD8/REST+API
I was specifically looking for a way to "Move" projects between project hierarchies. Obviously you can use the web user interface to Move a project however I need to automate this.
The REST API only talks about adding build steps, agents and so on. Is there a specific API to move a job? I tried using the Chrome Developer tools to see what happens when you move the project in a web UI but could not detect anything.
The application.wadl has methods to do most of these although the confluence page itself does not necessarily document every single feature.
To achieve this project move between different hierarchies, you had to do a PUT request to
http://$host/guestAuth/app/rest/projects/id:$project_to_edit/parentProject
with a JSON snippet (or an XML) of the form
{"id" : $new_parent_id}

Jenkins UI customization

I want to change the look and feel(ui customization) of Jenkins. Also I would like to add new views(say like new html pages or web pages) with navigation to the required jenkins pages etc.
Please let me know if any single plugins will help me to do so.Any relevant information(how ever generic) will be very helpful.
Any suggestions or links or tutorials is also appreciated.
PS:- Pretty new to jenkins.The inputs from here will help me to add more details to the questions.
I am looking for documents or tutorials that specify Skinning Jenkins using plugins like :-
https://wiki.jenkins-ci.org/display/JENKINS/Simple+Theme+Plugin
https://wiki.jenkins-ci.org/display/JENKINS/jQuery+Plugin
https://wiki.jenkins-ci.org/display/JENKINS/jQuery+UI+Plugin
https://wiki.jenkins-ci.org/display/JENKINS/JSWidgets+Plugin
The plugin page is providing very little information on how to use these and the benefits and the extend to which the UI can be changed.
Any doc or link is appreciated.
Assuming you don't want to write a Jenkins plugin, for adding pages, the best suggestion I can make is to use an HTTP proxy such as NginX, and configure it so that the pages you want to add are plain html files, and Jenkins is proxied for the rest of them. To a visitor, they will look like they are all part of the same site; you could copy code from the head and body sections of Jenkins-served pages to include some of the navigation.
The Simple Theme Plugin, which you found, will let you do basic customization of the look and feel of Jenkins. I do that for my build server and proxy it using this configuration fragment for NginX. The relevant CSS is in this CSS file - toward the end, look for the // JENKINS CUSTOMIZATION comment.
We use the Simple theme plugin - pointed at a css file for the simple styling, and a JS file to fix a couple of DOM oddities (some of the tables in the new look and feel have mismatching column counts).
Those two files need only be hosted either a handy http server, or you can place them in usercontent.
You need only refresh the page in the browser to see the changes. Both files can then happily reference other files served up too.
Handy things to note:
Jenkins has jquery, parts of YUI loaded and prototype loaded - so you can use them in your scripts.
If while debugging, the refresh gets in the way then use the console to enter the following to temporarily stop it without pausing JS: refreshPart = function() {}
When making DOM tree changes to content that is refreshed - attach it to the layout updates with:
layoutUpdatecallback.add(my_function) - that way your changes are applied to new incoming content.

Retrieve the user response saved in a file in an app hosted on Cloudbees

I have hosted a Tomcat application on CloudBees which allows users to edit some XML and saves them. I need to download and save these files locally for my personal usage. However I could not find a way to do this. I tried the 'download source' option but it downloads the original files that I had uploaded and not the edited versions. However my application is able to access the edited versions (and so clearly everything is being saved all right). Getting these files back is extremely critical and necessary for me and is, in fact, the whole motive of this app. Kindly tell if there is some way to get back the files in CloudBees or any other free Java hosting site which would allow me to do it.
It's not very clear from your question how your app is currently dealing with these files, but I'll take a swing at providing some general info.
To support editing and downloading of files, your app design would need to address the following issues:
How do users edit/upload the changed XML?
Where does your app store the changed XML?
How does your app retrieve the edited XML and make it available for download?
For #1, you will need to provide an edit or upload interface in your app for manipulating the XML files. I'm assuming this is something your app has already solved using a form of some kind.
For #2, you need to pick an approach for storing the files that is appropriate for app's needs and the runtime environment where your app will be deployed. For instance, on CloudBees (or most other CLoud platforms), it's important to understand that the local filesystem of the app can be used for temporary storage, but it is not clustered and it will be wiped away each time the app is updated or restarted. If these XML files need to be available forever, you will need to store them in a persistent location that is external to the application's runtime instance. Most developers use databases (such as the CloudBees MySQL service) to store persistent data in this way. In general, your app can store these files anywhere, but your app needs to manage how to store them, and how to retrieve them later.
For #3, to allow a user to download the changed files, you will need to implement your own mechanism for retrieving the file from its persistent location, and then send it back to the user's browser. If you want something like right-click "Save As" to work, then your app will just need to support a URL that can display the edited XML file directly in the browser. If your app then provides a link to that URL, users can download it using RightClick+SaveAs. If you want the user to be able to click on a button/link and trigger a Save As dialog automatically, then you'd need to write a URL handler (Servlet) that serves the XML content up using a Content-Disposition header (see this StackOverflow article). This header will tell the browser that the file is supposed to be saved to disk, and allows you to provide a default file name.

Resources