Skip to content
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

Instructions to run test suite on a physical device no longer work #70

Open
scottohara opened this issue Jul 15, 2016 · 3 comments
Open
Labels

Comments

@scottohara
Copy link
Owner

scottohara commented Jul 15, 2016

In the README, instructions for running the the test suite on a physical device state:

To run the tests in Mobile Safari on a physical device:

  • start the test runner without launching the default browsers (npm run test:coverage -- --browsers)
  • the Karma server will pause waiting for a browser connection
  • manually launch Mobile Safari and browse to the URL shown in the terminal window (eg. http://localhost:9876)

Due to the change in karma-runner/karma#1558, passing nothing for the --browsers argument is no longer allowed (so the only way is to manually comment out the browsers in karma.conf.js).

@scottohara scottohara added the Bug label Jul 15, 2016
@scottohara
Copy link
Owner Author

Simulator issue is now resolved.

Running tests in the simulator is now handled by npm test and uses karma-ios-simulator-launcher.

Running the app in the simulator is still handled by rake simulator:run. The problem was that splitting the output of xcrun instruments -s devices on new lines was using .split('\n') but needed .split("\n") (double quotes, not single quotes). Note that this loads the app in a Safari browser tab, rather than the standalone version saved to the home screen.

There is still an issue with the instructions for running the test suite on a physical device, as the README still suggests passing nothing for the --browsers arg.

There is also

@scottohara
Copy link
Owner Author

As part of the move from thin/shotgun to puma/rerun, removed the rake simulator:run task as it didn't really add much value, required some extra gems (e.g. Open4), and was brittle.

The process for manual testing in the Simulator is not simply to run npm start as normal; then manually fire up the simulator and browse to http://localhost:3001.

Leaving this issue open for the karma start --browsers problem, however.

@scottohara scottohara changed the title Simulator run/test instructions no longer work Instructions to run test suite on a physical device no longer work Jan 25, 2021
@scottohara
Copy link
Owner Author

Original issue description (saved for historical purposes):

In the README, instructions for running in the simulator are simply rake simulator:run, but this no longer seems to launch the Simulator after starting the server?

Also, instructions for testing in the simulator are rake simulator:test, which attempts to start the test running without the default browsers (eg. karma start --browsers).
Due to the change in karma-runner/karma#1558, passing nothing for the --browsers argument is no longer allowed (so the only way is to manually comment out the browsers in karma.conf.js).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant