Giter Site home page Giter Site logo

titouanvanbelle / fastlane-plugin-xchtmlreport Goto Github PK

View Code? Open in Web Editor NEW
26.0 2.0 15.0 28 KB

fastlane plugin for XCTestHTMLReport

Home Page: http://titouanvanbelle.com

License: MIT License

Ruby 100.00%
xcode fastlane swift xctest html-report xcode-ui-testing

fastlane-plugin-xchtmlreport's Introduction

screenshot

What is it?

Fastlane plugin for XCHTMLReport

fastlane Plugin Badge

Install

fastlane add_plugin xchtmlreport

Usage

Basic Usage

  • Add the following to your Scanfile
result_bundle(true)
  • Add a call to xchtmlreport after running your tests. For example
lane :tests do
  scan (
  	fail_build: false # Otherwise following steps won't be executed
  )
  xchtmlreport
end

Options

Specify the path to the result bundle

By default the plugin will use the default location of the result bundle which is under fastlane/test_output/ but your also have the ability to pass the path yourself

xchtmlreport(
  result_bundle_path: path_to_result_bundle
)

You can also pass multiple paths

xchtmlreport(
  result_bundle_paths: [
    path_to_ui_result_bundle,
    path_to_unit_result_bundle
  ]
)

Specify path to xchtmlreport

XCHTMLReport is by default install at /usr/local/bin/xchtmlreport. Should it be somewhere else you can pass the path to the binary to the plugin

xchtmlreport(
  binary_path: path_to_xchtmlreport
)

Enable JUnit reporting

You can enable the JUnit reporting as well

xchtmlreport(
  enable_junit: true
)

Contribution

Please create an issue whenever you find an issue or think a feature could be a good addition to XCTestHTMLReport's fastlane plugin. Always make sure to follow the Contributing Guidelines. Feel free to take a shot at these issues.

License

XCTestHTMLReport's fastlane plugin is available under the MIT license.

Troubleshooting

If you have trouble using plugins, check out the Plugins Troubleshooting guide.

Using fastlane Plugins

For more information about how the fastlane plugin system works, check out the Plugins documentation.

About fastlane

fastlane is the easiest way to automate beta deployments and releases for your iOS and Android apps. To learn more, check out fastlane.tools.

fastlane-plugin-xchtmlreport's People

Contributors

maciesielka avatar nd-net avatar robnadin avatar titouanvanbelle avatar ulazdins avatar

Stargazers

 avatar  avatar  avatar  avatar  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

fastlane-plugin-xchtmlreport's Issues

"Unable to find any .xccoverage file" error only with xchtmlreport

I have this error on Bitrise only with xchtmlreport plugin. If I remove it everything is ok.

Unable to find any .xccoverage file.
[10:28:35]: Make sure you have enabled 'Gather code coverage' setting on your scheme settings.
[10:28:35]: Alternatively you can provide the full path to your .xccoverage file.

Also, I tried to turn on/off 'Gather code coverage' nothing helped. Could you help with it, please?

my lane:

lane :myTests do
    run_tests(
      fail_build: false,
      workspace: "Workspace.xcworkspace",
      scheme: "TestScheme"
    )
    xchtmlreport
  end

Can't use `inline_assets` parameter โ€” need new release tag

Looks like it's supported in the code but when I tried it I got

Could not find option 'inline_assets' in the list of available options: result_bundle_path, result_bundle_paths, binary_path, enable_junit

    xchtmlreport(
      result_bundle_path: my_path
      binary_path: binary_path,
      inline_assets: true,
    )

I see it referenced here, https://github.com/TitouanVanBelle/fastlane-plugin-xchtmlreport/blob/da4e5ef643a0cc45fb3346fdd161ad80252b438e/lib/fastlane/plugin/xchtmlreport/actions/xchtmlreport_action.rb but is there something else missing?

Test build are passing even though tests are failing, failed test screenshots are missing

I'm facing two issues after trying to use: fastlane plugin of xchtmlreport

  1. Since we need to set fail_build: false always, test build are always passing even with failing test results. Also I'm not sure how to see the failed tests and its results out of so many passing tests that I have in my project.
  2. I deliberately failed one of my test and saw that the screenshots are not getting generated in CI.

Do we have fix for this already? Or is there a workaround for the same? Thanks in advance.

xcode 11

Hi, when will this plugin get updated with this PR ?

This plugin is failing in xcode 11
Error: Failed to find action_TestSummaries.plist in reports

Uninitialized Scan Error

I get this error when I run:

xchtmlreport(result_bundle_paths: [path1, path2])

Which is thrown when the plugin is called without running scan

This PR here provides a fix to it.

Exception Log

Logs

Looking for related GitHub issues on fastlane/fastlane...

Found no similar issues. To create a new issue, please visit:

https://github.com/fastlane/fastlane/issues/new

Run fastlane env to append the fastlane environment to your issue

bundler: failed to load command: fastlane (/system/user/.rbenv/versions/2.7.2/bin/fastlane)

NameError: [!] uninitialized constant Fastlane::Actions::XchtmlreportAction::Scan
/system/user/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-plugin-xchtmlreport-0.1.1/lib/fastlane/plugin/xchtmlreport/actions/xchtmlreport_action.rb:18:in run' /system/user/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.185.0/fastlane/lib/fastlane/runner.rb:263:in block (2 levels) in execute_action'
/system/user/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.185.0/fastlane/lib/fastlane/actions/actions_helper.rb:69:in execute_action' /system/user/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.185.0/fastlane/lib/fastlane/runner.rb:255:in block in execute_action'
/system/user/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.185.0/fastlane/lib/fastlane/runner.rb:229:in chdir' /system/user/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.185.0/fastlane/lib/fastlane/runner.rb:229:in execute_action'
/system/user/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.185.0/fastlane/lib/fastlane/runner.rb:157:in trigger_action_by_name' /system/user/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.185.0/fastlane/lib/fastlane/fast_file.rb:159:in method_missing'
Azure.fastfile:303:in block in parsing_binding' /system/user/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.185.0/fastlane/lib/fastlane/lane.rb:33:in call'
/system/user/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.185.0/fastlane/lib/fastlane/runner.rb:49:in block in execute' /system/user/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.185.0/fastlane/lib/fastlane/runner.rb:45:in chdir'
/system/user/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.185.0/fastlane/lib/fastlane/runner.rb:45:in execute' /system/user/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.185.0/fastlane/lib/fastlane/lane_manager.rb:47:in cruise_lane'
/system/user/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.185.0/fastlane/lib/fastlane/command_line_handler.rb:36:in handle' /system/user/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.185.0/fastlane/lib/fastlane/commands_generator.rb:109:in block (2 levels) in run'
/system/user/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/commander-4.6.0/lib/commander/command.rb:187:in call' /system/user/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/commander-4.6.0/lib/commander/command.rb:157:in run'
/system/user/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/commander-4.6.0/lib/commander/runner.rb:444:in run_active_command' /system/user/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.185.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:76:in run!'
/system/user/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/commander-4.6.0/lib/commander/delegates.rb:18:in run!' /system/user/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.185.0/fastlane/lib/fastlane/commands_generator.rb:353:in run'
/system/user/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.185.0/fastlane/lib/fastlane/commands_generator.rb:42:in start' /system/user/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.185.0/fastlane/lib/fastlane/cli_tools_distributor.rb:122:in take_off'
/system/user/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.185.0/bin/fastlane:23:in <top (required)>' /system/user/.rbenv/versions/2.7.2/bin/fastlane:23:in load'
/system/user/.rbenv/versions/2.7.2/bin/fastlane:23:in `<top (required)>'

xchtmlreport bundle path cannot contain space!

I am trying to do something like:
xchtmlreport -r "my app.test_result" OR
xchtmlreport -r my\ app.test_result

but both of them failed to generate report. It seems like xchtmlreport recognises "my app.test_result" as two arguments......

This issue happened after I updated my xchtmlreport to version 2.0.0 or the latest version

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.