ApacheJMeterTemporaryRootCA.crt not found in BIN folder - jmeter-5.0

I have not been able to see the ApacheJMeterTemporaryRootCA.crt file in the bin folder. I am running jmeter 5.2.1. I need to sort this so I can be able to add certificated to my API calls to the server. Please any help or pointing me to the right direction would be a life saver.
Or if anyone has an easier way I can attach certificates to each call to the server that might also work. I am running out of options.
Thanks.

JMeter by default out of the box doesn't come with this certificate in any of the versions until you actually start recording. In case you have migrated from a different machine/environment I would suggest below in the box where you are not able to see the certificate.
Add a Test Script Recorder, select Target controller to itself and click on Start. Once you start the recording and the pop-up for the certificate appears, refresh bin directory and you will be able to see the certificate.

In my case I run this file and then ApacheJMeterTemporaryRootCA.crt appear in bin folder (apache-jmeter-5.5 version)
apache-jmeter-5.5\apache-jmeter-5.5\extras\proxycert.cmd

Related

How to fix issue "Error code: SEC_ERROR_UNKNOWN_ISSUER" with JMeter and Firefox

I have installed the JMeter and Firefox. when I'm recording the script it is throwing an Error code: SEC_ERROR_UNKNOWN_ISSUER and I have installed the certificate in both Firefox as well as in the system
I"m using windows Machine and working on JMeter tool. Freshly installed JMeter and Firefox and installed the certificate in both machine as well as on the browser but event then it is throwing an Error code: SEC_ERROR_UNKNOWN_ISSUER
There is no need to install JMeter Certificate in Windows system storage, just in browser.
So, check that you have done every step:
Remove all old certificates from browser and windows.
Press Start record in HTTP(S) Test Script Recorder.
Install new just created certificate in your browser (ApacheJMeterTemporaryRootCA.crt located in your JMeter bin directory).
Do actions with your web application to record requests.
How to remove old and add new certificates in Firefox:
Start Firefox
Open menu
Options
Privacy & Security
View Cerificates
Ensure there are no certificates with names "_DO NOT INSTALL..", "DO NOT INSTALL..", "JMETER.." and other related to JMeter cerificates, or Delete them if they present.
Click Import.
Navigate to your JMeter bin dir and choose ApacheJMeterTemporaryRootCA.crt file.
Check Trust this CA to identify websites.
Press Ok

Firefox RootStore cert8.db/key3.db not existing

I want to access the Firefox Root Store under Windows (7) with Firefox 45.0.1. I found several sources that told me to navigate to C:\Users\{username}\AppData\Local\Mozilla\Firefox\Profiles\8ab3jkih.default\cert8.db.
Unfortunately I can't find cert8.db, although 8ab3jkih.default is present (and the only folder).
I tried accessing the DB with certutil, which works, but only gives me 4 certificates for -viewstore (should be about 150). Afterwards I tried accessing -getconfig and -databaselocations, but that just tells me that the system can't find the given file. I hoped to find the location of the database.
Yes, I already heard of NSS, but figured I should try it manually first, before working with it.
Is there anything wrong with my installation? Should I try to reinstall? What else can I do? My endgame btw is finding out whether a certain given certificate is a root certificate, so I just want to programmatically access the list of root certificates and compare them to the given cert.
First be sure you have correctly located your Firefox profile directory.
You can open the menu in Firefox (the three horizontal bars button), find the Help, then go to Troubleshooting information.... In this page, you can see the Profile directory button. Press it and there you go.
Or, another way to open this page, is to type in the direction bar:
about:support

Best way to install a firefox extension on the shell

I want to create a new profile with an addon preinstalled.
What works:
run firefox a first time.
add the addon.xpi to profile/extensions/addon.xpi.
edit profile profile/extensions.ini and add Extension0=/full/path/to/extension.xpi.
start firefox again.
What i need:
add the addon to profile/extensions/addon.xpi.
edit extensions.ini or something similiar.
use only relative paths, if possible (seems not to be implemented for extensions.ini)
Finally i want to create a zip file with some firefox preferences/addons, which can be unziped into a profilefolder to create a fresh profile with some preinstalled stuff. For this, it would be important, that everything works with relative paths. If it is definitely not possible, i can add some script to it. But i would prefer some "just unzip" solution.
I think it may be a bit harder, because mozilla wanted to prevent other software from adding toolbars and similiar to firefox by making external addon installation harder. What i already found is the key extensions.autoDisableScopes=0.
What you can do is open firefox with command line options. And pass the file path to your xpi file, so you don't have to mess with all this internals you are over there.
So do this:
"C:\Program Files (x86)\Mozilla Firefox\firefox.exe" "C:\my.xpi"
and on launch it will open a tab and prompt to install your addon.
In the prefs.js:
pref("extensions.autoDisableScopes", 14); // 0x1 not set
See https://developer.mozilla.org/en-US/Add-ons/Installing_extensions#Disabling_install_locations
Then put the addons into extensions/myaddonid.xpi, making sure the filename is the id given in the install.rdf file inside the addon.xpi (zip-)file as <em:id>addon_id</em:id> tag.
On the next start the addons will be silently installed. Some addons needed one restart to work, at least the toolbar buttons were not added on the first start.
Not sure, if this will still work, when firefox decides to allow only addons signed by addons.mozilla.org. On the other hand, they will allow self-hosting addons, as soon as they are signed by AMO, so preinstalling addons downloaded from there will have a good chance.

How to handle File Download pop up in Firefox using AutoIT in (selenium RC)

I need to download a file from application in my selenium RC test.
When i click on the link/button to save a file, first i get a pop up which asks me to either open or save the file, when i select 'Save' and click 'OK' then i get one more pop up asking me to provide the path where file is to be saved and file name also.
I goggled and found that this could be done via AutoIT but i am facing some problems while doing that.
so could some one please provide me the .exe file for file_download in Firefox and also where i can mention the path to save that file too.
and also if you could provide me what exactly the code, i need to write in my test case.
Please let me know how to handle this.
You can achieve that without using autoit also. follow below steps.
Create new firefox profile.
Change the preferences in that profile manually before starting the automation with that profile. (Change the settings like below)
Now start the automation using that profile so that files will be downloaded to default location.
Starting selenium server using specfic profile
java -jar selenium-server.jar -firefoxProfileTemplate "C:\Users\UserName\AppData\Roaming\Mozilla\Firefox\Profiles\234saddsf.customProfile"
I found this link: http://qtp-help.blogspot.com/2009/07/selenium-handle-dialogs.html
Unfortunately it is for the old style dialog boxes that do not have the open vs save radio buttons. I'm searching for a solution to this part of the problem.

Where are "Your Certificates" stored in Firefox?

I'm supposed to have some certificates installed in the "my certificates" section of Firefox, but there are none there. if I could figure out where there are stored (somewhere inside my profile directory maybe?) then I could try and restore from a backup.
This would be a better question for http://superuser.com, but look in your Firefox profile directory. Certificates are stored in the cert8.db file. Their corresponding keys are stored in key3.db.
If you need additional assistance finding your Firefox profile directory, detailed instructions are available at http://support.mozilla.com/en-US/kb/Profiles#How_to_find_your_profile.
if your are on windows go to the start menu click on run and type %appdata% and go to folder Mozilla\Firefox\Profiles\umqigyll.default the certificate are stored in the file cert8.db
go here for more

Resources