how do I add a simulation ID on the Gatling 3.3.1 since the mute option is not available anymore - scala-gatling

can not add simulation ID since the mute option is dropped in this version

You're in interactive mode because you don't specify the option to force the simulation class name.
Please have a look at the documentation.

Related

Automating Xcode' Debug > Simulate Location command

Is there any programmatic way to control the xcode > simulate location command? I have external location test scripts I'd like to run, and ideally the test suite could cause xcode to change the location of the connected phone at will.
Is this possible, and if so how?
Not sure if it's exactly what you're after, but you can have different unit test bundles use different locations (or GPX files) by setting it up in the scheme.
You could then have unit tests in each bundle which test what you need regarding that specific location.
xctool can also just run the unit tests in a specific target using the -only option:
path/to/xctool.sh \
-workspace YourWorkspace.xcworkspace \
-scheme YourScheme \
test -only SomeTestTarget
There is a GitHub project called Pokemon-Go-Controller that does exactly what you want.
Overview of the solution:
Create a gpx file
Create a blank project referencing (not copying) that gpx file and run it on your device
Run auto clicker which will constantly click update location in Xcode
Update gpx file using some script and the device location will be automatically updated
Instead of the auto clicker you can use this Apple Script:
#Will continue update the location to the location name below from Xcode:
property locationName : "pokemonLocation" #name of your gpx filex
###########################
tell application "System Events"
tell process "Xcode"
repeat while true
click menu item locationName of menu 1 of menu item "Simulate Location" of menu 1 of menu bar item "Debug" of menu bar 1
delay 0.2
end repeat
end tell
end tell
Yes, it is possible.
1. Set up the GPX files as described in #InsertWittyName 's answer, or as described in this blog post.
2. Use Instruments to run your app in the Simulator using the different GPX files.
I would write out the entire process, but someone more eloquent than myself already has.
As an avid S/O user, I would be bereft to leave what is basically a single-link answer. So here is some extra, bonus information.
You should definitely look into security testing your location aware features. I will be at Black Hat this year, so if you're there, let's talk about it!
If you don't like the previously linked/sort of explained answer, you could use XCTest with code to simulate different locations (like this).
It looks like there are also Apple Script solutions, like this one.
I hope I have at the very least provided enough information to qualify as more than just a lazy link-only answer. Enjoy, and good luck!
idevicelocation is a command line tool to mock geolocation in ios devices.
Usage:
$ idevicelocation [OPTIONS] LATITUDE LONGITUDE
Set the location passing two arguments, latitude and longitude:
$ idevicelocation 48.856614 2.3522219000000177
Passing negative values :
$ idevicelocation 77.432332 -- -7.008373564
Stopping Location Simulation:
$ idevicelocation --stop
Options:
-d enable connection debug messages.<br/>
-u specify device UDID.<br/>
-h help.<br/>
-s stop location simulation on device.
It uses libimobiledevice library to communicate with the process com.apple.dt.simulatelocation which is also used by Xcode internally for the same purpose.
Build instructions are there in the README file. Make sure to mount the correct developer image before going random places. Thanks to Angulo for writing this awesome utility.
This tool is not currently being shipped with libimobiledevice package although there's a Pull Request pending since long.

What is the purpose of the $VERSION_INFO_SUFFIX in an Xcode project?

Its used by agvtool - but Apple's documentation is seriously lacking here:
https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man8/agvtool.8.html
Is this suffix added? Is it removed? Why would you do this?
Does anyone actually use this or know of a concrete use case?
Although this could be used for anything, one use case for the $VERSION_INFO_SUFFIX ("Version Name Suffix" as it appears in Xcode) is to differentiate between several versions of the app on the same device, and enable a single device to install different binaries of the same application without changing the major/minor/bugfix version or build number. This suffix is added to the version number at buildtime. But to be honest I've never seen this used in practice, or in Apple's guides on versioning.

Inspecting a soundfont on iOS

It is possible using AudioUnits on iOS to create samplers that load and play soundfont (or SF2) files. This is a really great feature. The problem is that I don't see any interface for inspecting a soundfont to see: a) how many presets it contains and b) the names of the presets it contains.
It is possible to obtain the current preset name by first loading the soundfont into the sampler using AudioUnitSetProperty with kAUSamplerProperty_LoadInstrument and then calling AudioUnitGetProperty with kAudioUnitProperty_ClassInfo on the sampler. This is not very efficient however, and only tells you the name of the currently loaded preset. It also does not seem to tell you how many presets are contained in the soundfont.
How does one do these things without using 3rd party code (surely it is natively supported)?
Another option is a soundfont editor for OSX called polyphone
This is a very old question, but I do have another solution: my SoundFonts
application. It is available on the AppStore for a small fee, or you can use the source to build what you want.
The repo contains an SF2 parser in C++ that I reworked from some code I found online. The repo also contains a catalog.py Python script that generates listing from a SF2 file. It uses the sf2utils Python package.

Monodroid cleartask flag available?

I need to run an activity and remove all the other activities for my application to save memory. I have seen in the sdk that the flag FLAG_ACTIVITY_CLEAR_TASK does exactly this but I can't find it in the ActivityFlags enum in monodroid.
Is this possible to be done with monodroid?
ActivityFlags.ClearTask is available in Mono for Android. However, Android didn't introduce this flag until API version 11, so I'm guessing that you're targeting a previous version. In order to use this flag, you'll need to update the minimum version of Android you target to 3.1, which is configurable in the project's properties page.
Edit: This question has some other approaches you can take to do this on previous versions of Android.

How does Apples's own ASLR implementation work?

According to ASLR(Address Space Layout Randomization), It provides random stack and heap allocations and page load every time a process starts, and randomize the address where objects are placed in virtual space of a given process.
But in my application running on ios, i create an object named ObjectA, after several reload the process ,i found that the address of ObjectA is all the same ,no randomize.
How does Apples's own ASLR implementation work? Why ObjectA's address is all the same?
What you mean for "several reload"? You should explicitly quit the application, because of the multitasking you might reopen the same process.
eg.
This is one of my applications printing out the address of a UIViewController instance, as you can see the address of the object is different in every execution.
First run: <DCViewController: 0x13d4a0>
Second run: <DCViewController: 0x2880f0>
Third run: <DCViewController: 0x2a2050>
(I do not think this is the case but in XCode there's an option to enable PIE (Position Independent Executable) under "Build Settings" and it's called "Don't Create Position Indipendent Executables", you can find it easily but typing "pie" in the search box. This option should be set to No).
EDIT:
Moreover Xcode will only make PIE binaries if deployment target is >= 4.3
Hope this helps =)
For completeness, the guy who did the work to answer that question was Dino Zovi in Apple iOS 4 Security Evaluation. My apologies if someone else published before Dino (I am not aware of the work or who you are).
Zovi published his stuff well before Apple published iOS Security. Dino's work is still more complete.

Resources