Code Monkey home page Code Monkey logo

cavy-cli's People

Contributors

abigailmcp avatar em-cd avatar igorrfc avatar jalada avatar jonathanandrews avatar thealmightybob avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cavy-cli's Issues

Quoted arguments are not passed through correctly

Related roadmap ticket

$ 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)

cavy-cli init

It would be useful if cavy-cli had an init command that:

  • creates an index.test.js file
  • copies in anything that exists in index.js, wrapped in the Cavy Tester component
  • creates a example spec file in a spec folder and passes it into the Tester component

In progress results

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.

Unable to use index.android.js entry point

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.

image

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...?

Add Port Option

It would be helpful if the port (8082) could be customizable so that multiple cavy instances can be run at once.

If you don't have a test entry point, it's not obvious that you need one or you need to fix your index.js

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.

Can't see test outputs

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?

Identifying test failures from command-line

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?

Handle when Cavy never runs

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.

Cavy run-android

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

TeamCity support

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?

Richer report file

Output to a report file so continuous integration tools can give a richer report of what tests passed/failed.

Usage with `npx`?

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?

Using Cavy with multiple entry points

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.