-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Where should I run the ios test? #95
Comments
What are you trying to do - develop a plugin? Paramedic is an extra thing to run the plugin tests. One way to use it is outside the context of the plugin. See the Travis configuration of the camera plugin for example:
This executes the paramedic script and gives it The other way is to install Paramedic globally, so it is available as If this doesn't work and you get error messages, let me know and post the complete output you are getting - I am sure I can help you debug this. |
@janpio thanks for reply so soon. I tried the command. I got the error as below. Did I miss anything?
|
Paramedic runs the tests outside of your application, it builds its own one during the testing setup - and then runs the tests that are defined for the plugin. What command did you execute to get the result above? (Please also try to include the complete output you get in the command line - often there are important info bits for contet) A start would be to check out e.g. the camera plugin and execute your test command there - and see if this works. If it does, then the problem might be with your current plugin. |
I just run
|
Oh, wait a minute - how did you install paramedic? We haven't released the lastest fixes, that is why your output doesn't match mine at all. Best use the second method mentioned here: https://github.com/apache/cordova-paramedic#installation |
I installed it with
|
When I try the cordova-plugin-console plugin I got different error.
As I found from the file /Users/dong/Library/Logs/CoreSimulator/CoreSimulator.log. There are so many lines like below: It seems that cordova-paramedic use the iPhone-5 as default. How can change it to 12.0. I did not think I install iPhone-5. So I think this may be the problem. We need to test at latest version. The 5 is too old. |
Damn, you arr having a terrible experience here. Sorry about that. I do not know if there is a parameter to overwrite the simulator being used. I found this code regarding the simulator: cordova-paramedic/lib/utils/utilities.js Lines 59 to 121 in 9146804
cordova run --list --emulator --no-telemetry --no-update-notifier | grep ^iPhone | tail -n1 What does it return? What about cordova run --list --emulator --no-telemetry --no-update-notifier | grep ^iPhone ?
|
This is the return value of first one cmd: iPhone-5, 10.2 Ah it seems that iPhone-5 is installed. But My xcode version is 10.1. Does that matter? |
No idea to be honest. It might, because of apache/cordova-ios#407 :( |
probably. I got this |
Find the code that produces this output:
and add the bit to the |
OK. Thanks for the reply. |
Paramedic uses https://github.com/apache/cordova-plugin-test-framework to run those tests, you can also build an app with it manually. The Cordova testing setup is not very well documented, I am currently fighting my way through all the repositories connected and try to write it down. Let me just copy my current draft for the plugins part in here: PluginsPlugin tests are somewhat special, as they are set up in a different way. Nativehttps://github.com/apache/cordova-plugin-camera/tree/master/tests/ios Plugin tests with
|
@janpio Thanks very much for the doc. Really appreciate it. |
I am new to Cordova and I want to know more about the test process.
I found this https://kerrishotts.github.io/pgday/workshops/2017/campp/testing.html#cordova-paramedic, in which some steps are provided to test a plugin.
I am still confused that where should I start the test. In the tests dir or in the root dir of plugin ? Or somewhere else? I assume that I will have to run the test in tests dir. But it failed with
Failed to install plugin : tests
. So I am confused now.Please help me with this. Thanks.
The text was updated successfully, but these errors were encountered: