Testing BlackBerry code without starting the device simulator - testing

In Eclipse, I want to test some java microedition network code -- javax.microedition.io.HttpConnection -- to see if the network connection is successful and get some cookie values. But running this code using a JRE on my development machine doesn't execute the method, unless I launch and test using a simulator.
Can I run BlackBerry code using a desktop JRE or will I always have to test using a simulator?

I've never heard of a way of running BB code without running the simulator. You can set a program to automatically start the simulator and "click" some buttons so you can run tests automatically, but I don't think this is what you're looking for...

Related

Instrumentation Test not starting on Android only on a real device. Working on Simulator

I am mainly facing an issue with running detox tests on android real device. The main problem I face is that await device.launchApp() just doesn't launch the app. After adding some log traces I see that android instrumentation command is the one that is not actually starting the app. Detox internally calls the command /Users/<uname>/Library/Android/sdk/platform-tools/adb -s 39bc3158 shell am instrument -w -r -e detoxServer ws://localhost:51414 -e detoxSessionId 5c04ed58-aa77-64bb-aa2b-3a008f21ac2b -e debug false com.realapp.app.test/androidx.test.runner.AndroidJUnitRunner. This command hangs and Process Times out after sometime and doesn't launch the app.
If I create an instrumentation test from android studio also I am seeing the same issue and this problem only occurs on a real device and not on a simulator. Simulator works absolutely fine and the test cases run smooth.
I have looked into different issues, used 4.1.2 android studio, Invalidated cached and restarted upgraded to latest beta android studio and nothing seems to help.
Also the instrumentation tests run fine on the real device if i open the app manually after starting the tests. The tests are just not launching the app automatically.

Windows Phone Emulator won't launch

The emulator used to run fine, but as of late whenever i try to launch it, whether directly from the programs list or by running code in Visual Studio, the emulator will launch, stop responding and crash, then when I hit "close program" it will launch itself again, stop responding and crash again. I've looked everywhere and cannot get an answer to this issue.
Thanks
The only way i think is by reinstalling the product.
Just so you know, make sure that you're using the right version of the SDK for your OS (on PC) and using just the right emulator supported by your OS (pc).
Like for SDK 8.0, if you're developing Win8 app, use 'Device' for direct app deployment onto your phone or "Emulator WVGA 512MB" for optimized, memory-constrained output on your PC itself.

Can Xcode's OCUnit tests run on iOS device rather than simulator

I am trying to run OCUnit tests using my iPad but find that Xcode (version 4.3.3) always
gives the message Test Succeeded even if the test actually failed - i.e. the debug console logs the test as failed. If I run exactly the same tests but using the simulator the tests fail as I would expect.
For example I created a new project with the following test:
- (void)testExample
{
STFail(#"This test should fail");
}
When I ran it on iPad Xcode gave the Test Succeeded message:
When I ran it on the simulator Xcode gave me the Test Failed message:
Is it possible to get a Test Failed message running this on an iOS device?
Thank you!
The SenTesting framework is not complete and it does not guarantee to work with devices, But it does work fine with the simulator. In order to run unit test on your device, I recommend you to use this library,
GHUnit
Im not sure exactly what your asking, but the simulator works exactly the same. So be sure to keep the device plugged in to the computer when you are doing these tests. Yes you really do need to rephrase your question, i will be back when you do so.

Debugging iOS app built from commandline

I am building an app for iOS via commandline but I am having problems debugging it. Had I built using XCode, it would have let me "build and debug" on device without problems. But now, I don't know how to launch it on device using gdb and step through it. If I try to "add a custom target/executable" to a blank XCode project and then launch it, XCode complains about not finding the executable. Same thing happens if I install the app on device manually and try to attach to it using gdb within XCode. Any pointers on how to go about debugging this app? Changing the build process to use XCode is not an option.
This site gives a nice tutorial on how to manually set up a remote debugging session on an iOS device. The process boils down to creating a remote debugging server on the device and attaching to it with a local GDB instance.

iPod App crashes on launch

Is it normal that when i try to test my app it crashes on launch?
I explain.
I have my app that works fine in the simulator. I wanted to try to test it on my iPod Touch 4g.
I built and run from XCode, and that's what happened: the app launches fine (it shows me a black splash screen),but then suddenly it comes back to the springboard,with no reason.
If i open up the app manually,after it crashed,it works without any problems. It happens only one time,just when i build and run,and i don't know why.
How can i do to avoid this? On simulator it works with any crashes,but when i run it over my iPod,it crashes.
Program ended with exit code: 0 // on simulator
The app is likely to be failing to run on the device as xcode is trying to attach the debugger to it but doesn't have permission to do so.
Check your entitlements.plist within your project; you probably have one that has get-task-allow set to NO. This needs to be 'YES' to allow the debugger to attach. (It does need to be 'NO' for adhoc builds though - one solution is to exclude the entitlements.plist file from the debug build.)