Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Trying to run with testplans fails unless you specify a workspace #362

@tejassharma96

Description

@tejassharma96

New Issue Checklist

  • Updated fastlane-plugin-test_center to the latest version
  • I read the README.md
  • I reviewed the example(s) for the action(s) I am using
  • I have removed any sensitive data such as passwords, authentication tokens, or anything else I do not want to world to see
  • I have reviewed the Discussions forum to see my question has already been addressed.

If you love this fastlane plugin, consider sponsoring it or asking your company to sponsor it. I would really appreciate any
gesture: https://github.com/sponsors/lyndsey-ferguson. 😍

Issue Description

When using multi_scan, I can't pass in a testplan without specifying the workspace. Previously I was able to just rely on scan finding the workspace automatically, but if I try to use a testplan it hooks into testplans_from_scheme without any chance for scan to populate those values. This means that when testplans_from_scheme tries to get the testplans (here), both schemes_from_project and schemes_from_workspace return nil, resulting in the stacktrace I pasted below.

If I pass in the workspace manually it works as expected.

Not having to specify the workspace is valuable to me since I'm essentially maintaining this fastlane script to be used by multiple teams, so I always want to minimize the amount of information they need to input (ie it isn't as simple as just specifying the workspace for my project, it would be a new configuration item I would need to collect as part of the setup).

Would it be possible for multi_scan to update the options that scan auto-populates before calling into other places? Something like updating runner.rb in multi_scan_manager to also set Scan.config = multi_scan_options (or some subset of multi_scan_options), which would trigger the detection of missing values, and then merge Scan.config back into multi_scan_options? This is a mostly uninformed point of view based on just going through this plugin and fastlane's source code, but it feels like it would be straightforward to implement and update.

Hopefully this is something that can be updated as part of this plugin and I don't need to add a new config item for my consumers 😅

Let me know if there's any extra info you need from me.

Stacktrace

/Users/tejass/.asdf/installs/ruby/3.0.1/lib/ruby/gems/3.0.0/gems/fastlane-plugin-test_center-3.15.3/lib/fastlane/plugin/test_center/actions/testplans_from_scheme.rb:33:in schemes': \e[0;31;49m[!] undefined method length' for nil:NilClass\e[0m (NoMethodError)
from /Users/tejass/.asdf/installs/ruby/3.0.1/lib/ruby/gems/3.0.0/gems/fastlane-plugin-test_center-3.15.3/lib/fastlane/plugin/test_center/actions/testplans_from_scheme.rb:5:in run' from /Users/tejass/.asdf/installs/ruby/3.0.1/lib/ruby/gems/3.0.0/gems/fastlane-plugin-test_center-3.15.3/lib/fastlane/plugin/test_center/helper/test_collector.rb:164:in only_testing_from_testplan'
from /Users/tejass/.asdf/installs/ruby/3.0.1/lib/ruby/gems/3.0.0/gems/fastlane-plugin-test_center-3.15.3/lib/fastlane/plugin/test_center/helper/test_collector.rb:53:in derive_only_testing' from /Users/tejass/.asdf/installs/ruby/3.0.1/lib/ruby/gems/3.0.0/gems/fastlane-plugin-test_center-3.15.3/lib/fastlane/plugin/test_center/helper/test_collector.rb:62:in testable_tests_hash_from_options'
from /Users/tejass/.asdf/installs/ruby/3.0.1/lib/ruby/gems/3.0.0/gems/fastlane-plugin-test_center-3.15.3/lib/fastlane/plugin/test_center/helper/test_collector.rb:84:in derive_batches_from_tests' from /Users/tejass/.asdf/installs/ruby/3.0.1/lib/ruby/gems/3.0.0/gems/fastlane-plugin-test_center-3.15.3/lib/fastlane/plugin/test_center/helper/test_collector.rb:27:in initialize_batches'
from /Users/tejass/.asdf/installs/ruby/3.0.1/lib/ruby/gems/3.0.0/gems/fastlane-plugin-test_center-3.15.3/lib/fastlane/plugin/test_center/helper/test_collector.rb:18:in initialize' from /Users/tejass/.asdf/installs/ruby/3.0.1/lib/ruby/gems/3.0.0/gems/fastlane-plugin-test_center-3.15.3/lib/fastlane/plugin/test_center/helper/multi_scan_manager/runner.rb:69:in new'
from /Users/tejass/.asdf/installs/ruby/3.0.1/lib/ruby/gems/3.0.0/gems/fastlane-plugin-test_center-3.15.3/lib/fastlane/plugin/test_center/helper/multi_scan_manager/runner.rb:69:in setup_testcollector' from /Users/tejass/.asdf/installs/ruby/3.0.1/lib/ruby/gems/3.0.0/gems/fastlane-plugin-test_center-3.15.3/lib/fastlane/plugin/test_center/helper/multi_scan_manager/runner.rb:26:in initialize'
from /Users/tejass/.asdf/installs/ruby/3.0.1/lib/ruby/gems/3.0.0/gems/fastlane-plugin-test_center-3.15.3/lib/fastlane/plugin/test_center/actions/multi_scan.rb:37:in new' from /Users/tejass/.asdf/installs/ruby/3.0.1/lib/ruby/gems/3.0.0/gems/fastlane-plugin-test_center-3.15.3/lib/fastlane/plugin/test_center/actions/multi_scan.rb:37:in run

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions