Issue in recording script using Jmeter in Android - jmeter

In JMeter, use Templates > Recording
Unfold Workbench > HTTP(S) Test Script Recorder and start recorder
A certificate authority file is generated in jmeter/bin folder called ApacheJMeterTemporaryRootCA.crt
Install it in Android
Connected my device in to desktop by advance setting in wifi
But its not recording my action in desktop.............
How to find whether my device is connected but desktop?

First use JMeter Recording Template
Then start JMeter's HTTP(S) Test Script Recorder, it will generate in jmeter/bin folder, a file called ApacheJMeterTemporaryRootCA.crt .
Copy file to your android device and install it as CA Certificate.
See How do I install a user certificate? thread for more details.
The certificate has limited life time (defaults to 7 days) but you can extend it by setting in user.properties
proxy.cert.validity=Number of days
Now the problem you'll face in Android >= 7.0 is that applications only use by default System installed Certificates.
So you'll need to ask developper of application to modify the APK, see why here.
Edit manifest and add :
android:networkSecurityConfig="#xml/network_security_config"
You'll get:
<?xml version="1.0" encoding="utf-8"?>
<manifest ... >
<application android:networkSecurityConfig="#xml/network_security_config"
... >
...
</application>
</manifest>
Then add in res/xml/network_security_config.xml this:
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config>
<trust-anchors>
<!-- Trust preinstalled CAs -->
<certificates src="system" />
<!-- Additionally trust user added CAs -->
<certificates src="user" />
</trust-anchors>
</base-config>
</network-security-config>
Note that this is needed whatever tool you use (Neoload, LoadRunner, ...)
For full details read:
https://www.ubik-ingenierie.com/blog/how-to-record-android-application-using-https-traffic-jmeter/

Related

Why emulator not opening? (Xamarin)

https://i.stack.imgur.com/S2za3.jpg
Emulator(phone) won't open. What is the problem?
Output: Hardcoded string "Button", should use #string resource
when another emulator(phone) is installed it gives this error
https://i.stack.imgur.com/54dEY.jpg
Output: The package was not installed. Please check you do not have it installed under any other user. If the package does show up on the device, try manually uninstalling it then try again. You should be able to uninstall the app via the Settings app on the device.
NOW
I deleted the old app links. The second error is over. The first error persists. The emulator does not open on the phone.
Output: Hardcoded string "Button", should use #string resource
This is a warning not an error. This warning would not affect the app running. I was able to reproduce this when set the text like below.
<Button
android:id="#+id/button1"
android:text="Button"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
If you want to fix the warning, add a Strings.xml in you value folder of Resources. Strings.xml is a string table to help with localization of the application.
Add the codes below into Strings.xml:
<?xml version="1.0" encoding="utf-8" ?>
<resources>
<string name="Button_Text">Hello</string>
</resources>
And use it in your Layout:
android:text="#string/Button_Text"

How to run application as administrator in Qt

How can I start my Qt application as administrator or get a prompt when admin privilege is needed? I have tried everything in the posts that I could find about it and most of them are a few years old. Nothing has worked and everyone seems to have a different spin on it. I have downloaded the windows SDK to get mt.exe, created the manifest files, the RC file and every other methods including right click and set the application to start in administrator mode. Nothing has worked. I need it because a task in my program requires administrator privilege. QFile::errorString() says access denied. Does anyone know how to make this work?
Okay so I found the answer to my question. I had found some solutions before, but they were not working. I found the reason why they were not working. The reason was very stupid: It was because the folder that my files were in had a space between the first and second word like (my app) which causes an error about not being able to find the location.It should be (myapp) with no spaces. The error about location not found was only happening when trying to add the adim privileges. Otherwise everything worked fine and there were no errors. So here is the solution and make sure there are no spaces in folder names.
1) Create the rc file :Open notepad and paste the following text inside then
save the file as yourappname.rc This creates the rc
file. Put the file in the folder that has all of your sourcecode and pro
file.
#include <windows.h>
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "yourappname.exe.manifest"
2) Create the manifest file with notepad, paste the following text, and save it
as yourappname.exe.manifest and put it in the same location as above.
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="2.0.0.0" processorArchitecture="X86"
name="yourappname.yourappname" type="win32" />
<description>A discription of your app</description>
<dependency />
<!-- Identify the application security requirements. -->
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges>
<requestedExecutionLevel
level="requireAdministrator"
uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>
3) In your pro file put the following text:
win32 {
RC_FILE = yourappname.rc
}
That's it. Now your application should start with administrator privileges.
There are similar post that describe this process too. Just make sure there are
no spaces in your folder names or it won't work. Also you MUST run qt with
administrator privileges for it to work. Right click Qt and run as
administrator before trying to compile.
Works for me (add in your_project.pro):
win32 {
CONFIG += embed_manifest_exe
QMAKE_LFLAGS_WINDOWS += /MANIFESTUAC:"level='requireAdministrator'"
}
To get the require admin prompt to display, I simply added
QMAKE_LFLAGS += /MANIFESTUAC:\"level=\'requireAdministrator\' uiAccess=\'false\'\"
to my qmake file. I use this in my projects all the time.
Easiest way is config at project Run configuration, adding this env variable:
__COMPAT_LAYER=RUNASINVOKER
then cleanup and rebuild and run again the proj, it will work.

Freeswitch update profile using mod_xml_curl

I am currently working on a project that updates profiles on a freeswitch server, using mod_xml_cur.
My problem is the following
My project is a selfhosted owin webapi that creates a profile and when requested uses owin to create an xml that should be loaded by freeswitch.
when i use the command "sofia profile test start" it fetches the profile(named test) from my owin url.
on the Console I see "Reload XML [succes]
but then it states [WARNING] sofia.c:5603 No Such Profile 'test'
the downloaded XML file is in /tmp with a temporary name .
And when I rename it and move it to /etc/freeswitch/sip_profiles#
and start it again, it loads the profile.
My understanding is that using mod_xml_curl the profile should load from memory when the xml is opened from my owin url.
What am I doing wrong here?
<document type="freeswitch/xml">
<section name="configuration">
<profiles>
<profile name="Your profile name">
<gateways>
<gateway name="Your gateway name">
<param name="username" value="Your username"/>
<settings>

Updating my Firefox extension - autoupdates not working

My Firefox extension is not hosted on the official extension site. It is hosted on a secure (https) server. From what I have read, I do not need to sign my add-on, right?
The problem is that it is not working. I install my plugin, and click on 'Check for updates', but it says no updates have been found. I have set the version in the update manifest and in the install manifest from initial.rev332 to initial.rev333.
Could someone shed some light on my situation? Thanks very much :)
My install manifest...
<?xml version="1.0" encoding="utf-8"?>
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#">
<Description about="urn:mozilla:install-manifest">
<em:id>jid0-BsYlcooDmgR331LCKZwABfD4yQk#jetpack</em:id>
<em:version>initial.rev333</em:version>
<em:type>2</em:type>
<em:bootstrap>true</em:bootstrap>
<em:unpack>false</em:unpack>
<!-- Firefox -->
<em:targetApplication>
<Description>
<em:id>{jid0-BsYlcooDmgR331LCKZwABfD4yQk#jetpack}</em:id>
<em:minVersion>3.4</em:minVersion>
<em:maxVersion>30.*</em:maxVersion>
</Description>
</em:targetApplication>
<!-- Front End MetaData -->
<em:name>iStyla</em:name>
<em:description>iStyla is a marketplace for themes for Facebook, Twitter and Google+ </em:description>
<em:creator>iStyla</em:creator>
<em:homepageURL>https://www.istyla.com/</em:homepageURL>
<em:updateURL>https://www.istyla.com/Updates/firefox.rdf</em:updateURL>
</Description>
</RDF>
My Update Manifest
<?xml version="1.0"?>
<r:RDF xmlns:r="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://www.mozilla.org/2004/em-rdf#">
<r:Description about="urn:mozilla:extension:jid0-BsYlcooDmgR331LCKZwABfD4yQk#jetpack">
<updates>
<r:Seq>
<r:li>
<r:Description>
<version>initial.rev333</version>
<targetApplication>
<r:Description>
<id>{jid0-BsYlcooDmgR331LCKZwABfD4yQk#jetpack}</id>
<minVersion>3.0</minVersion>
<maxVersion>30.*</maxVersion>
<updateLink>https://www.istyla.com/Updates/Firefox.xpi</updateLink>
<updateHash>
sha256:af031d8bb9303a42ab1f270845e9c692d65cd4fc
</updateHash>
</r:Description>
</targetApplication>
</r:Description>
</r:li>
</r:Seq>
</updates>
</r:Description>
</r:RDF>
I think your addon version number needs to be in a different format: https://developer.mozilla.org/en/Install_Manifests#version
Try the versioning format listed here to differentiate versions: https://developer.mozilla.org/en/Toolkit_version_format
Maybe try <em:version>0.0.333</em:version>
Also, I don't think <em:maxVersion>30.*</em:maxVersion> is valid (I could be wrong though. If you're not hosting it on AMO it might work alright). Here is the list of valid Firefox version numbers available FWIW: https://addons.mozilla.org/en-US/firefox/pages/appversions/

Firefox addon devellopment - getting addon not compatible error message

I am building a firefox addon for the first time.
When I try to install I keep getting this error message "Addon not compatible with firefox 4.0"
I tried to install on older version of firefox also but no luck. I am not sure what i am doing wrong. Here is my install.rdf file.
<Description about="urn:mozilla:install-manifest">
<em:id>priyank#techstudio.in</em:id>
<em:name>Chrome Dictionary</em:name>
<em:version>0.1</em:version>
<em:type>2</em:type>
<em:creator>Priyank Gandhi</em:creator>
<em:description>A sample extension.</em:description>
<em:homepageURL>http://www.priyankgandhi.com/</em:homepageURL>
<!-- Mozilla Firefox -->
<em:targetApplication>
<Description>
<em:id>{ac236786-4ca7-48d0-8f3b-034fe9ad2dbc}</em:id>
<em:minVersion>3.0</em:minVersion>
<em:maxVersion>6.0.*</em:maxVersion>
</Description>
</em:targetApplication>
</Description>
Here is the structure of my files:
|-chrome.manifest
|-install.rdf
|-chrome
|mydir
||content
||-main.xul
||-main.js
||skin
||-main.css
Thanks
I think your target application em:id is off:
{ec8030f7-c20a-464f-9b0e-13a3a9e97384} - Firefox's application ID.
Source: https://developer.mozilla.org/en/Building_an_Extension

Resources