Logic Testing on iOS devices is not supported?
Asked Answered
C

5

14

I am using the SenTestingKit to Unit Test, but I get the following message

Logic Testing on iOS devices is not supported. You can run logic tests on the Simulator.

How can I do this?

Clericalism answered 10/12, 2011 at 6:41 Comment(2)
Please take a moment to write a sensible, easily understandable question.Prayer
Looks like you need to do your logic testing on the simulator.Gunlock
K
16

Logic tests only work on the simulator, you need to switch to the simulator, i.e.

enter image description here

Logic tests require a special unit test launcher which is not installed on actual devices.

If you want to run your tests on an actual device you can convert to application unit tests. These are essentially the same but you application gets launched first (as a 'host') and your tests get run along side them. This means your tests can run on any device that your application supports. The only disadvantage is that your actual app will be running which can interfere with your test, especially if you use a lot of notifications.

Kazimir answered 11/12, 2011 at 11:35 Comment(0)
Z
30

You need to have a Host Application

enter image description here

Note that the image is pointing to the General tab of Test target's configurations.

Zackzackariah answered 9/7, 2015 at 2:59 Comment(3)
FYI, this is not relevant for a project that is a frameworkGravitt
@Gravitt Disagree. You just need to create a new “TestHost” app target in your framework project settings— just a basic Single View App will do, with no customization beyond adding your framework to the Embedded Binaries build setting. Easy.Sailing
I don't have option to select app.Sweven
K
16

Logic tests only work on the simulator, you need to switch to the simulator, i.e.

enter image description here

Logic tests require a special unit test launcher which is not installed on actual devices.

If you want to run your tests on an actual device you can convert to application unit tests. These are essentially the same but you application gets launched first (as a 'host') and your tests get run along side them. This means your tests can run on any device that your application supports. The only disadvantage is that your actual app will be running which can interfere with your test, especially if you use a lot of notifications.

Kazimir answered 11/12, 2011 at 11:35 Comment(0)
C
0

we have to build and test our project in cxode only through webdriverAgrentRunner. select real device : webdriverAgentRuuner>>device name

Churchly answered 19/6, 2017 at 5:22 Comment(0)
S
0

If you are asking this question for Automation testing then "YES, you have to change the WebDriverAgentRunner to a Real device and run the test again". The error will be disappeared

Shandy answered 28/2, 2019 at 2:38 Comment(0)
S
0

Quanlong's answer is correct, but it doesn't describe the details. Here are the needed steps in order to test a framework on a real device:

  1. Click the + sign under the list of targets and add a target of type "Application". "TestHost" is a good name.

  2. Under the General tab of the Tests target, add TestHost as the "Host Application"

  3. Under the "General" tab of the TestHost target, add the framework itself to the list of "Frameworks, Libraries and Embedded Content"

  4. If the framework uses Pods, edit the Podfile, add a target ‘TestHost’ do section and make sure all pods are also installed into the TestHost target

Serrano answered 22/3, 2023 at 14:40 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.