pixielabs / cavy-cli Goto Github PK
View Code? Open in Web Editor NEWCommand line interface for Cavy
License: MIT License
Command line interface for Cavy
License: MIT License
Is it possibile to add cavy cmd for expo project without ios and android folder?
thanks
Get a working example of an Android build in CI
in my test case there having async timeout, but cavy cli get stoped while my test case is not resolve
$ cavy run-ios --simulator="iPhone 8"
cavy: Running `react-native run-ios`...
info Found Xcode workspace "CavyTester.xcworkspace"
error Could not find "iPhone" simulator. Run CLI with --verbose flag for more details.
cavy: react-native exited with code 1.
$ cavy run-ios --simulator="iPhone\ 8"
cavy: Running `react-native run-ios`...
info Found Xcode workspace "CavyTester.xcworkspace"
info Launching iPhone 8 (iOS 13.4)
It would be useful if cavy-cli
had an init command that:
Support RN apps that have both index.ios.js
and index.android.js
entry points rather than a single index.js
.
At the moment, cavy-cli outputs the results of all tests at the same time once they've all finished. If would be nice if we outputted the result of each test individually as they complete.
The -file
option for cavy-cli
renames the corresponding test file (e.g. index.android.test.js
) to simply index.js
instead of the specified entry point of index.android.js
, which means that it cannot be found by the app.
If I manually replace index.android.js
with the contents of index.android.test.js
, then the tests run as expected.
iOS does not seem affected by this... I'm not actually sure why. Maybe it has fallback logic to use index.js
if it doesn't find index.ios.js
...?
It would be helpful if the port (8082) could be customizable so that multiple cavy instances can be run at once.
Related Pivotal Tracker ticket: https://www.pivotaltracker.com/story/show/179970095
If you don't have an index.test.js
, cavy-cli silently assumes you've altered your index.js
already to wrap your app in a <Tester>
component. This feels like throwback behaviour to v. early Cavy days and probably something we should fix.
We should warn the user if cavy-cli doesn't find a test entry file, otherwise they might feel like its broken.
After running cavy run-ios --skipbuild
in a react-native project using expo, I'm getting the following lines in console:
cavy: Found an index.test.js entry point. Temporarily replacing index.js to run tests.
cavy: Running `mv index.js index.notest.js && mv index.test.js index.js`...
cavy: Listening on port 8082 for test results...
The app is running in a simulator already but I don't see any test output in neither expo metro bundler nor the terminal console. Any suggestions on how to solve this issue and see my test results?
When writing a script to run Cavy tests and notify about test results, it is helpful to know the difference between test failures and build failures (since cavy-cli
both builds and runs the tests in one go).
Currently it returns 1
in the event of test failures.
My question is: is there confidence that 1
will not also be returned in the event of a build failure (i.e., by the React Native CLI that cavy-cli
wraps)? Should some more unique number be returned instead?
Reporters like cavy-cli should wait for a short time once the app has booted for a 'Cavy is starting!' message.
We could use websockets for this.
If you just run cavy
on its own on the command line, it just sits there.
With the "Cavy run-android" command i get this error:
cavy: running `react-native run-android`...
events.js:183
throw er; // Unhandled 'error' event
^
Error: spawn react-native ENOENT
at _errnoException (util.js:1022:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
at onErrorNT (internal/child_process.js:372:16)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
at Function.Module.runMain (module.js:695:11)
at startup (bootstrap_node.js:188:16)
at bootstrap_node.js:609:3
Hi, I'd like to add TeamCity Test reporting support for Cavy, and am trying to figure out the most reasonable approach.
TeamCity actually supports specially-formatted console output messages that it can translate into its own rich test reporting, so the simplest approach would be to add an option for cavy-cli
to switch to that format instead of the default human-readable output. Would it bother you for cavy-cli
to have specialized knowledge of a specific CI system?
The option with minimal modification to Cavy would be to use the existing "custom reporting," however in this case we want pretty much everything the default reporter/server already does, just with tweaked output formatting, so that'd be a lot of duplication and managing another express
server... (also I'm not sure how compatible cavy-cli
is with this... since it won't exit until it receives a report... so the custom reporter would also have to report to cavy-cli
...?)
I also see #18, and am wondering if there was a specific plan there? In addition to the special console logging, TeamCity also supports some report formats produced by other testing tools, listed here: https://www.jetbrains.com/help/teamcity/xml-report-processing.html . If you were already planning on using one of those formats for other CI systems, perhaps that would achieve multiple goals, but I'm not sure if that was the plan or how involved it would be to produce one of those reports.
It would be nice if cavy-cli
could somehow support custom output formatter plugins, but that may not be feasible or useful outside this particular scenario.
Do you folks have any thoughts on this?
Output to a report file so continuous integration tools can give a richer report of what tests passed/failed.
I'm getting the following error with the latest version:
$ cavy run-ios
cavy: Found an index.test.js entry point. Temporarily replacing index.js to run tests.
cavy: Running `react-native run-ios`...
Command `run-ios` unrecognized. Make sure that you have run `npm install` and that you are inside a react-native project.
cavy: react-native exited with code 1.
cavy: Putting your index.js back.
How can I tell cavy to run npx react-native run-ios
?
README update - you can pass in additional arguments to cavy run-ios
/ cavy run-android
, but people might not know.
Hey there, we have a project we are really interesting in integrating Cavy with.
Our app has four entry points:
customerIndex.ios.js
customerIndex.android.js
proIndex.ios.js
proIndex.android.js
So my thoughts are to have a .test.js
for each of these... e.g.
customerIndex.ios.test.js
However I can't figure out how to specify which one to run with Cavy. It wants index.test.js
.
It also does some renaming of the files so the Cavy'd file becomes the entry point for the build variant, which I understand but I could probably manually set this up in Xcode and Android Studio as test build variants.
Can I use Cavy entirely without the CLI and manually set up the test files?
Thank you! Really excited to give this a try
The latest react-native starter app uses app.json
and imports name
to register with the AppRegistry
. We should make our index.test.js
do the same then you don't have to remember to write your app name in it!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.