I have a load test project that I run regularly from the Visual Studio using the Load Test GUI. I would like to run that test from the command line by changing its parameters such as the number of users, run duration etc.
In visual studio load test, there are usually 3 type of settings that I usually play around.
Test setting: for general controller and agent assignments.
Run settings: in which I set the run duration, where to save the logs of the test results etc.
Scenario settings: used to set the load pattern and test mix etc.
Ideally I should be able to change any of these settings using some command line parameters of MSTEST utility or assigning a setting file for each goal, however I haven't been able to accomplish that setting change using the MSTEST command line options. I am able to run the load test using the state where I left off before exiting the GUI, however I cannot set the runsetting that is not currently active or I cannot change the user load defined in the scenario settings.
For my current task, being able to change the user load from the command line is more urgent than changing other parameters. So if someone knows how to change Scenario Settings from the command line that would be great help. I already tried creating more than one scenario with different number of users however in Visual Studio, seems like it is not possible to select particular scenario and execute test using it. Once the load test starts, it runs every available scenarios sequentially. So I think for my purpose I should create only one scenario and be able to change the user load from command line somehow.
Thanks for the help in advance.
As far as I know, none of those items are available as command line options or similar. But all, or possible just most, are available programmatically via a load test plugin. One possible solution for you is to set the required values in the LoadTestStarting event. The values could be read from a file or from environment variables; you choose what values are available and how to represent them.
This Microsoft blog introduces load test plugins and has several examples.
This is the MSDN doc on how to set test settings you want active from command line with MSTest.
https://msdn.microsoft.com/en-us/library/ff426021.aspx
Unfortunately, I haven't been able to find a way to change the step load pattern (and user count within).
Related
I am trying to automate the install of a few setup files (.exe). I managed to get one working without any issue but am having difficulty with the second.
I created response files by using the following in command prompt:
MyProgram.exe -r
This generated a "setup.exe" file in C:\Windows as I would expect it to. Here is an example of what the file looks like in notepad:
[{PRODUCT_GUID}-DlgOrder]
Dlg0={PRODUCT_GUID}-SdWelcome-0
Count=5
Dlg1={PRODUCT_GUID}-SdLicense-0
Dlg2={PRODUCT_GUID}-SdAskDestPath-0
Dlg3={PRODUCT_GUID}-SdSelectFolder-0
Dlg4={PRODUCT_GUID}-SdStartCopy-0
[{PRODUCT_GUID}-SdWelcome-0]
Result=1
[{PRODUCT_GUID}-SdLicense-0]
Result=1
[{PRODUCT_GUID}-SdAskDestPath-0]
szDir=C:\Example\
Result=1
[{PRODUCT_GUID}-SdSelectFolder-0]
szFolder=Example\Folder
Result=1
[{PRODUCT_GUID}-SdStartCopy-0]
Result=1
I run the install with the setup.iss (response file) using the command:
program.exe /S /f1.\setup.iss
All response files seem to work except for one. The program opens a dialog asking me to select from a pair of radio buttons to select what language manual I want it to install. I want it to default to hit the "Next" button but there's obviously nothing recorded in the .iss file to do so.
What do I have to manually add to the .iss file in order to complete this prompt?
Why doesn't my recording put this in?
Additional information:
If I manually hit "Next" at this step, the program completes install as expected.
The program successfully installs when I install everything manually.
It sounds like this installation includes a custom dialog that doesn't properly handle either MODE SILENTMODE or RECORDMODE. For silent installations to work properly, it needs to call SilentWriteData and SilentReadData when appropriate.
If you are the author of this installation (whether original or inherited), you should handle this case. If you are not the author and are trying to install this installation silently, you should contact the vendor, or (as Glytzhkof suggests) ask on a more relevant site for workarounds.
I think the response file will only contain the actual answers that were input during the original response file creation session. Did this missing dialog show up during the original setup run? Reboot dialogs and rare to display dialogs are often missing from the response file.
It could also be that the missing dialog is a custom made dialog and not a built-in Installshield dialog. I suppose this could mean it doesn't behave in the standard way.
How complex is this setup? How many systems are you deploying to? To reliably deploy files like these it is common to use "setup capture" and repackage as MSI files - so called application repackaging.
Depending on how many setups you have, how important they are and how many machines they need to reliably work on it might be worth capturing them. This is a highly complex task at times, but yield more reliable deployment once done right. Personally I find the biggest benefit of repackaging is the availability of a reliable uninstall - provided you have cleaned up the capture properly. Otherwise you have to create response files for the uninstall too. Very clunky and error prone - even when done well.
You might want to take this discussion to serverfault.com - the system administrator equivalent to stackoverflow.com. You can also have a look here: http://unattended.sourceforge.net/installers.php
I have a group at work asking if there is a way to pass in values, either via command line or an ini value, that will "fill in" values that are normally provided by the user during install. For example, if I have a drop down that the user can select they're installing the client, server, or both, they want a way to automate this so the user doesn't have to select anything.
Basically, they want to automate running the installer without actually showing the wizard panels and populating user values based on command line args or an ini file.
I know you can use ini files, but I don't think they're used for this reason. And I don't see any way that command args would be used.
Is there a way native to Inno Setup to do this?
Thanks!
One way to set all the standard settings at once is to use an INF file via the /LOADINF parameter.
It is also possible to extend this to custom page settings if you wish (with cooperation by the setup author).
There are many command line parameters already included in Inno which you can use: http://www.jrsoftware.org/ishelp/index.php?topic=setupcmdline
With them you can set task, directory, group, components, password etc etc.
If you need something special you can use your own command line parameters.
Use GetCmdTail() function to get cmd line parameters for setup or uninstaller.
As this is common question there are already some advanced parsers and methods like this one:
Is it possible to accept custom command line parameters with Inno Setup
I suggest you to use /SILENT parameter for not showing the setup forms together with e.g. /TASKS, /DIR and /COMPONENTS and some custom parameter.
Update: It appears that VS doesn't have the hooks needed to do what is needed in my use case. However there are a couple of options that could work for other people and as such I'm marking the question as answered but I would love to find a solution that works for me.
We have encrypted files that are routinely kept in encrypted form within source control (TFS). When I want to compare versions I use Beyond Compare and have added the encryption/decryption tool as filtering on the read/write process to allow plain text viewing and editing.
However if I just want to open the file for reading/editing it's a bit tedious using a dummy comparison just to view/edit the file.
As such as I wondering if there is a configuration setting or way in Visual Studio that would allow me to insert a filter on the read/write so that it could display/edit/save files that would otherwise be unreadable.
Edit:
*NB: The encryption aspect is just single use case *, I'm actually looking for a generic answer that doesn't require writing an editor to replace the editors within VS that already exist such as the MS supplied XML editor or the custom third party ones.
I have both custom and non custom files that are encrypted. Each file type already has an editor. We have no access to the source for any of these editors. The problem is that the file is encrypted in TFS, and all I need is the filtering on the read and write for all files regardless of editor.
I want to use all the existing features of the installed editors without change. Only the reading and writing need to be customised.
Here's a potentially hacky way to achieve what you are trying to do, if there is no other easy option.
TFS stores data in a SQL database. Therefore you can theoretically modify the read/edit command that is used to extract the data from TFS and send it to the editor/viewer. This might involve modifying a stored procedure, or putting a trigger in place to modify the data before it is presented to the editor.
You would need to run a Profiler Trace on the TFS database when you click on edit/view or browse to the node in the source control tree. This will help you to figure out what data TFS is accessing and what functions/stored procs/tables etc it used to extract said data.
The same in reverse; you'd need to modify the 'writing' of the data to use your custom tool before putting it in the DB.
SQL has the ability to call CLR code, so you could use your tool if it's written in .NET.
The easiest way would be to download the 2012 SDK, Microsoft already provide a nice walkthrough on how to implement your custom editor HERE.
The process is:
Install the SDK
Fire up VS2012; Select New Project -> Other Proj Types -> Visual Studio Package
Visual C#, company name, etc...
Tick the "Custom Editor" tickbox
Fill in the rest of the details
So now you're presented with all the source of a vanilla text editor, and the part you want to hook in to is the IPersistFileFormat::Load() and IPersistFileFormat::Save() functions found under EditorPane.cs and put your encryption/decryption routines in there, thus you'll be left with a text editor with a custom encrypted file format.
This may not do what you need, since you need to call third party exe. However this answer may be useful for others that have access to source code (or a dll or library).
You could write a file system filter that encrypts/ decrypts the data to and from disk. Note that the driver sits at the OS level, and is outside of Visual Studio.
From the MSDN article File Systems and File System Filter Drivers:
A file system filter driver intercepts requests targeted at a file system or another file system filter driver. By intercepting the request before it reaches its intended target, the filter driver can extend or replace functionality provided by the original target of the request. Examples of File Systems and File System Filter Drivers include anti-virus filters, backup agents, and encryption products.
See this Code Project article for a tutorial: File System Filter Driver Tutorial. The article does not show how to do encryption/ decryption, but shows how to get a simple driver up and running.
There are extensions that will capture events to the current window save for example and what turns out to be document load. ** This is not a custom editor **
check out the following two links:
http://msdn.microsoft.com/en-us/library/dd885244.aspx
and a fairly complete open source addin that works with files when saved (regardless of type)
https://bitbucket.org/s_cadwallader/codemaid/src/7cf1bf6108801f48b85e30d85e1646fbc73ba889/CodeMaid/Integration/Events/RunningDocumentTableEventListener.cs?at=default
which hooks the RDT table to extend the current environment. You would need to adjust from here of course but this should get you going in the right direction.
There used to be Dynamic Data Exchange API (type of IPC) in windows which allowed sending notifications with params to running process and they would grab focus and conduct the operation. Is there anything similar in xwindows/gnome?
Like for example, when I get my phpunit errors, it comes with file path and line number. Was wondering if using any bash script or perl etc, I could grab the output and make the line below clickable
protected/tests/controllers/CmsControllerTest.php:17
so it quickly focus on my eclipse, open the file and moves cursor to the right line number.
phpunit and eclipse is just for examples. enough said.
The usual way to address this, would be to make the functionality an eclipse plugin.
There are lots of examples on how to write such plugins.
Moreover, you can probably lean on/reuse rather feature complete existing views (Problems view, Tasks view etc.) so making it look beautiful and matching eclipse should be a breeze.
Alternatively, there is a rich API that you could use to implement your own IPC channel to talk with your test runner outside Eclipse. An example of that is eclimd, the Vim-eclipse integration thing. Specifically, look at it's behaviour in 'Headed Eclipse' mode.
There's a part of my setup that I never want to run when calling it through command line, but always run it through the interface.
I was doing this through a [task], and simply not passing that particular task in the command line options.
My problem is, when running this setup through the interface, I don't even want to give this option to the user, and I can't find a way to hide a task from the setup interface.
Is there a way to hide this task? Or another, better way to solve this problem?
There is no natural difference between running the setup from the "interface" (presumably Explorer?) and running from a command prompt.
Maybe you mean /silent? If so, use the WizardSilent() function.
If you don't want it to be silent, you can pass your own /skipXYZ parameter that you then check using GetCmdTail() or {param:...}