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

Issue with Karate in an application packaged by Spring Boot #751

Closed
celcius112 opened this issue Apr 26, 2019 · 26 comments
Closed

Issue with Karate in an application packaged by Spring Boot #751

celcius112 opened this issue Apr 26, 2019 · 26 comments

Comments

@celcius112
Copy link
Contributor

Hi @ptrthomas, I'm back with more issues with classpath, Spring Boot, and JAR (or bootJAR in this case).

I have a dummy project here, which is a Spring Boot application that launches a single runner class (com.karate.karatespring.feature.Runner.java) on startup, using the JUnit 5 test factory. This runner class will simply launch the feature file Feature.feature that asserts on a boolean initialized in karate-config.js.

Problems arise when I launch the JAR. The feature file is found 45 times by FileUtils.scanForFeatureFiles, and as such is launched 45 times (which is a bit too much). Also, the karate-config.js file is not found on the classpath, with the exception skipping bootstrap configuration: could not find or read file: classpath:karate-config.js.

I found these issues by migrating from version 0.8.x to version 0.9.x.

Thank you for your time, and thank you for your work on Karate.

@ptrthomas
Copy link
Member

tagged as "help wanted" you know what to do @celcius112 ;)

@celcius112
Copy link
Contributor Author

celcius112 commented Apr 26, 2019

That was quick 😛 I've already tried (quickly) to find a solution, but since the project is quite large in my standards I might need some time to find a solution that does not break anything 😁

@ptrthomas
Copy link
Member

take all the time you need, since no one else has reported problems since #520 - and you know how hard that was

@warrenc5
Copy link

even just some nice debug logging so we can see exact file it's looking for and where it's looking.

image

@ptrthomas
Copy link
Member

closing because of inactivity

@ptrthomas
Copy link
Member

@celcius112 awesome work on the PR ! re-opening as "fixed" :) this will be in 0.9.5

@ptrthomas
Copy link
Member

@celcius112 turns out some of the changes completely broke things on windows. I have had to make some changes and comment out your spring-boot test which now fails

it is back to the drawing board a little - and I request you to test on windows before submitting the next PR. I would also try using the URL as a last resort if really no other way to get the stream works.

@celcius112
Copy link
Contributor Author

celcius112 commented Aug 30, 2019

that is some pretty horrendous news 😢 I'll probably need to rework everything

@ptrthomas
Copy link
Member

@celcius112 no it is fine, I really appreciate your contribution - very few people do. I did do some more improvements to the FileUtils and I don't think you need to re-work much. as I said, I don't really like to depend on a URL in the Resource instance, but if that is the only thing that will work for spring-boot, please go ahead and add it. but try to follow the existing pattern (maybe cache the contents in the static Map like you already see for JAR resources) - maybe I asked you already, but if you want to join a slack channel send me an e-mail: https://github.com/intuit/karate/wiki/Support

@ptrthomas ptrthomas removed this from the 0.9.5 milestone Sep 26, 2019
@ptrthomas
Copy link
Member

@celcius112 closing due to inactivity

SalilGupta12 added a commit to SalilGupta12/karate that referenced this issue Jul 27, 2020
* webauto: this is big, we have friendly locators

* webauto: move finder & mouse to interfaces
so that the method signatures are easier to read for those viewing via readme / doc links

* adjust maven profile for ui in hope that it works

* Revert "Add afterFeature and beforeFeature hooks, RunnerBuilder"

This reverts commit 88026a2

* Junit4 can run tests in parallel

* improve zip based on feedback and doc

* more doc updates based on feedback

* implemented waitForText() short-cut

* webauto: decided to rename waitForText() and waitForEnabled()

* Revert "Merge pull request karatelabs#871 from pshrm/develop"

This reverts commit cb905bd, reversing
changes made to 0da4f41.

* slight improve to timeline view tooltips

* additional tweak for karatelabs#826 replaces karatelabs#863

* unified cli for karate core somewhat karatelabs#827
in the future, the netty picocli has to be merged and we also would have native html parallel reports
but for now, we can start testing the vs code plugin for this
parallel execution will now generate native html report and continuously update the results-json.txt
which the plugin can read and update etc

* default to proper karate runner system always

* fix bugs with cli runner and switch netty fatjar to runner builder karatelabs#827

* big improvement to intellij ide support
the test results will have timings and logs associated correctly
also using the unified karate short-syntax for scenario / line number etc

* webauto: decided to use 1 based indexing for friendly locators
trust me it jst did not feel right with zero based indexing

* thats what happens when you dont run the local tests

* webauto: focus() breaks on fancy input fields, fixed

* hooks expanded for all cases, beforeAll() afterAll()
and even beforeStep() afterStep()

* webauto: improve target api design

* webauto: handle cookie failure in web-driver

* fix for focus() js and chrome cookie error routine

* some long pending call vs read doc

* minor cosmetic readme tweak

* added a couple more crazy examples

* webauto: reduce intensity of friendly locator search

* gracefully fail if browser / input field type
does not support moving text cursor to end

* webauto: implemented waitForResultCount()

* better error message if relative path does not exist

* draft version of vscode debug adapter protocol implementation

* move debug server test to junit so that karate-apache is on cp

* Add resources methods to the Builder

* vscode debug server start option
for both standalone jar cli and the runner, so this can be fired in a maven project
also upgraded picocli to latest for the -d arity 0..1 feature

* minor loggin changes to debug server

* use of waitForResultCount

* debug adapter decoder bad logic fixed

* debug server now supports called features
almost everything, step-in, step-out, multiple breakpoints

* get build to work on windows and clean up
this breaks karatelabs#751 but needs investigation / reopen

* refactor / cleanup to prev commit ref karatelabs#751

* debug adapter protocol: implemented repl evaluate and step-back

* debug server: hot reload of code works
so after editing a feature in the editor, the restart button on the debug toolbar
needs to be used to trigger the hot-reload
limitation for now: only line edits, no line adds or deletes will be supported
but still, this is going to be awesome

* tweak to fileutils for absolute file paths
which does come into play when doing vs code debug sessions

* debug: another breakthrough - we can debug parallel threads
and now the vscode launch can accept the whole command-line parallel-threads tags and all

* cleanup for prev commit

* standalone jar cli error stack trace trimmed
also docs here and there

* debug server proper optimization of netty decoder

* improve prev commit even more

* some license headers were missing, added

* fix relative path resolution, no more weird ///

* wip distributed testing capability
abstraction of job server and executor nodes call back over http
wip docker image that includes karate standalone which acts as an agent
we can get all reports and logs back from remote executors - todo aggregate

* jobdist: wip continues
karate-chrome docker container now based on java+maven and with standalone jar
improve supervisord for shutdown from within a docker container via bash command
improved / cleanup of job-executor code

* jobdist: reports aggregation working after scale-out
able to convert cucumber json back to result java objects on server

* distjob: wip ui test videos can be retrieved
now just need to fiddle with paths and some env props in java
todo background step cucumber-json conversion

* distjob: ironed out most issues with workflow
and the video file corruption problem is solved

* distjob: wip proven to work on jenkins + kubernetes
one thing pending is video for distributed mode

* distjob: improvements, video embed

* fix bad bugs in job / exec

* fix nasty bug with nested call with driver

* intro beforeStart and afterStop for driver config
greatly improved docker image stability - for now not starting socat for remote debug todo

* fix step out in debug server
docker now can start ffmpeg if needed for docker target

* improve / simplify fat-docker build

* always wait for browser / driver port even if not starting

* no report for empty features

* fixed debug npe for background steps

* screen recording for mobile automation
added startRecordingScreen and stopRecordingScreen API
implemented saveRecordingScreen with embed to html feature

* distjob: bullet-proofing and some testing

* improve timeline html tooltip

* debug: log message for hot reload implemented

* debug: improve user feedback

* debug: improve log for prev commit

* debug: try system exit for clean stop

* added appium api to readme doc

* review changes karatelabs#895

* distjob: lot of fixes and bulletproofing saving work

* update release process after 0.9.5.RC2

* adding back the simple jobserver test it is needed

* fixed bugs in debug server
any step failure resulted in no more steps working, fixed
variable string conversion failure would crash session

* fix for debug and maven class paths

* decided to do the right thing and change driver scripts() to scriptAll()
also introduced the especially useful in debug repl highlightAll()

* debug support should work for gradle now

* adding local docker demo runner

* driver is auto passed to called features
and does not matter if shared or isolated scope
here we have a bending of the rules, a driver is always global

* lower-case-headers applies only to keys not values

* one line change makes jdk12 compile work for 8 runtime

* attempt windows fix for paths with spaces

* attempt fix for windows single feature debug session

* introducing scriptAll() that takes 3rd filter-predicate arg

* renamed findAll() to locateAll() and intro locate()

* added 3rd delay arg to driver input api

* for sake of debugger, driver element to be stringify-able

* classpath from jar was not working in some cases

* minor doc updates before rc3

* big change: we have killed the karate ui
this means everything builds on openjdk 8-12 and no more build and ci problems for developers
the karate-ui is not needed anymore because we have the visual studio code extension for debugging
and we really tried to use javafx but there were too many issues

* doc updates since we killed the karate-ui

* changes for karatelabs#903

* doc updates

* one more doc tweak

* ci can be normal openjdk now

* ci mvn cache, and goodbye karate-ui

* some doc edits, and to test ci

* improve contributor guides

* wip: working on distributed gatling support
and realized we need a stand-alone gatling example just like we have jobserver
so decided to finally open an examples folder that will hold multiple examples of which
we have a few already, so they can now live in the karate monorepo

* readme edits

* distributed job server working for gatling, todo test docker

* job executor now will ping server with a heartbeat every 15 seconds
this is great to ensure all remote ends are healthy, in the future this will allow us to do the following
a) slurp logs from remote executors as long running test is progressing, think gatling - so we can generate reports any-time
b) abort a test - when the next heartbeat comes in we can respond with a special case abort message
the heartbeat has to use a second http client else severe concurrecy issues happen
so this second thread can now throw an exception which will cause the main executor loop to shutdown

* ignore examples jar files

* add hot reload functionnality for mock server

* multipart/form-data endpoint success from REST client but fails in Karate tests karatelabs#797

* minor edit for driver.title readme

* make sure docker container has deps pre-loaded for gatling
improve logs for job server (more at info level) to give confidence that things are happening etc

* rebrand to karate ui, and added link to readme

* change file change handler to use Jave Watchservice instead of a sleep loop

* implemented local address support for gatling
refer https://stackoverflow.com/a/55458266/143475

* added missing highlight() to element / finder api
also added friendly locator find() option to also use visible text, not just tag name

* code cleanup after karatelabs#909

* set type so that it does not create work dir with name null

* HACKTOBERFEST-match != fails with two integers

* fire change event for js based select-box twiddling

* added retry chained to finder / element

* doc edits

* MockSpringMvcServlet issue for @ControllerAdvice NoHandlerFoundException

* code cleanup after karatelabs#931

* Update consumer-driven-contracts to spring boot 2

Update consumer-driven-contracts to spring boot 2

* making correction to karatelabs#932

* update supervisord command to be the correct path for google-chrome

* Update Chrome.java

* Update Chrome.java

* Update Chrome.java

* fix gatling value copy edge case ref karatelabs#936

* minor code cleanup

* Fix formatting in pages site

* Fix formatting in pages site

* escape intellij magic log strings karatelabs#954

* escape intellij magic log strings karatelabs#954

* gatling url pattern bug
pretty bad miss that causes tests that use the comma-delimited path keyword to lose the forward-slashes
so a url like http://foo/bar/baz would become http://foo/barbaz

* release tweaks for 0.9.5.RC4

* edge case syntax error should not hang tests #959

* safer impl for #959

* finally, solution for custom masking of http headers / payloads in logs karatelabs#699
also attempted along with this is more control over [report verbosity] possible from the execution-hook

* doc edits minor

* http log masking for jersey also karatelabs#699

* fix for karatelabs#970 and replace karatelabs#973

* some doc / typo edits

* dynamic scenario outline pre-scenario vars deep-copy was losing js functions karatelabs#982

* error handling for karatelabs#967

* updating docs

* dont auto-close driver in called scenarios karatelabs#969

* implemented tags support in karate-gatling karatelabs#968

* attempt to fix karatelabs#924 but doesnt seem to work

* updated docs to use Runner.path() builder API
and not the KarateOptions annotation for parallel test execution

* edit release process cheatsheet

* edge case for regex combined with array fuzzy karatelabs#988

* junit 5 should fail if no features found karatelabs#989
also decided to rename the static method / helper to run()

* update doc for karatelabs#989

* edit readme for examples/jobserver

* add getPrevResponse() to scenario-context for advanced hook use-cases

* better xpath for wildcard with index karatelabs#993

* of all the times you commit without testing karatelabs#993

* doc edits and archetype sync for junit 5

* multipart streams will be re-readable for retry until karatelabs#999

* [break] implemented configure abortedStepsShouldPass karatelabs#755

* implemented driver poll for port configurable karatelabs#990

* implemented mock headerContains() karatelabs#997

* improve code for karatelabs#755

* Add support for optional body in Postman convert

Also adding whitespace to the Postman converted output.

* log collection for dynamic scenario outline karatelabs#1003

* input stream special handling in json embedded expressions karatelabs#1009

* doc edits and import cleanups

* Add logic for Postman import on netty CLI

* Include tests

* fix build after karatelabs#1011

* wip - introducing [karate-robot]
karate-robot is an attempt to build the following cross-platform capabilities into karate
a) native mouse events b) native keyboard events c) desktop image capture d) image matching
we have the basics in place for mac, linux and windows
decided to use the javacpp presets for opencv https://github.com/bytedeco/javacpp-presets/tree/master/opencv
also the [karate-chrome] docker image has been revamped - now includes an x-windows manager (fluxbox)
and is compatible with [karate-robot]
note that opencv on windows seems to be slow to startup / load the dll-s and may need investigation
otherwise we have the foundation in place to be able to use images to locate areas on the screen and navigate
todo: improve the robot api and add a configure option similar to karate driver (now branded as karate ui)
which will inject a [robot] object and helpers similar to how [driver] works today for karate ui

* [robot] keyword to init robot + config similar to [driver]
see feature file in commit for example

* [robot] working on image matching, introed region concept
and chainable api-s to find, click - also highlight() is working, very useful to troubleshoot image stuff
facing some challenges with more image matching, needs investigation
may need to deep dive into the opencv routine and look at other options, finding a set of matches instead of one
and also getting into thresholds, search types, image types (right now only grayscale) etc

* [robot] simple flow works
lesson learned - the way opencv image finding works currently requires the image to be the same size
we probably need a way to match even if scale is different, todo

* [robot] wip find by image even when scale is not 1:1
seems to be working and even came up with a threshold detection score based on trial and error
robot will now retry if image not found based on the threshold score calc
driver config now working to highlight match region if flag is true

* some places in docs / examples to use enhanced scenario outline

* support headless flag for firefox

* Update documentation

* Update documentation

* [robot] wip relaxing the image find threshold slightly

* synchronized getFreePort to avoid duplicate port assignments

* skip unnecessary window close on quit

* configure header / cookies now reflect in http-request-builder karatelabs#1025

* Always add 'alwaysMatch' block to capabilities

* make some readme section more clear

* improve readme

* fixed bugs in ui demo scripts

* cucumber tables will now appear in report json / html report karatelabs#1035

* Support acceptInsecureCerts in driver options

* Updated README with acceptInsecureCerts

* simplify w3c webdriver capabilties karatelabs#924
so the user can specify whatever is needed and we keep the karare side simple
this makes sense as there are so many options, eg saas / remote drivers

* improve upon prev commit karatelabs#924

* improve edit upon prev commit karatelabs#924

* update w3c capabilities handling karatelabs#924
also updated chrome-web-driver to be w3c compliant for latest chrome version
some new problems with safari, will defer

* always use w3c driver capabilities alwaysMatch  karatelabs#924

* update ui web examples

* upgrade apache httpclient version

* karate can now use a remote webdriver instance
added [webDriverUrl] key and some extra driver init logic and works fine against zalenium
breaking change for some of the wip appium work
see doc changes for all the details

* minor doc edits

* confirmed to work with aws device farm and selenium grid standalone
also changes to what was discussed in karatelabs#924
so now it is [webDriverSession] and not [webDriverCapabilities] so user has full control over the
webdriver POST to /session payload - which will take care of any remote / saas situation
and quirks of implementations like selenium grid
introduced [httpConfig] key and now you can configure the http client e.g. readTimeout which is
needed for aws as it can take a long time for a device / browser desktop to be provisioned
see readme edits for details

* fixed doc typo update

* refactored webdriver implementation
especially the start life-cycle, better error detection and handling on session fail
mobile / winappdriver breaking change for starting session, need to use [webDriverSession]

* fixed gaps in winappdriver demo

* improve stabilize ui infra
docker-target will pull only if flagged, and will remove container instance at end
added nice test to check docker container locally in demo/driver/core
chrome native will always wait for http to be ready

* ie driver wip

* iedriver tested and working fine

* added doc for iedriver

* more logical refactoring of ui driver packages

* added simple skeleton for testing / replicating karate ui issues

* null in dynamic scenario outline cell causes npe karatelabs#1045

* updated docs to point to external example

* fix link in prev commit

* fix link in prev commit 2

* ok last try for the readme tweak

* defensive coding for karatelabs#1047

* upgrade jersey version

* update docs

* [warn] karate.log() now pretty prints

* karate-robot ready for (experimental) release
now you can set a base-path from which images will be loaded
added readme to get things going

* prep doc for release wip

* update doc release wip

* doc edit wip

* prep release 0.9.5 final

* Bump netty.version from 4.1.37.Final to 4.1.50.Final in /karate-core

Bumps `netty.version` from 4.1.37.Final to 4.1.50.Final.

Updates `netty-handler` from 4.1.37.Final to 4.1.50.Final
- [Release notes](https://github.com/netty/netty/releases)
- [Commits](netty/netty@netty-4.1.37.Final...netty-4.1.50.Final)

Updates `netty-codec-http` from 4.1.37.Final to 4.1.50.Final
- [Release notes](https://github.com/netty/netty/releases)
- [Commits](netty/netty@netty-4.1.37.Final...netty-4.1.50.Final)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: Peter Thomas <[email protected]>
Co-authored-by: Sharma Prashant <[email protected]>
Co-authored-by: lukas.cardot <[email protected]>
Co-authored-by: Peter Thomas <[email protected]>
Co-authored-by: babusekaran <[email protected]>
Co-authored-by: BenjamQC <[email protected]>
Co-authored-by: Nishant-Sehgal <[email protected]>
Co-authored-by: tbhasin <[email protected]>
Co-authored-by: Manoj Y <[email protected]>
Co-authored-by: BadgerOps <[email protected]>
Co-authored-by: srangaraj1 <[email protected]>
Co-authored-by: ghostwriternr <[email protected]>
Co-authored-by: Thomas <[email protected]>
Co-authored-by: Celeo <[email protected]>
Co-authored-by: paaco <[email protected]>
Co-authored-by: alexanderp <[email protected]>
Co-authored-by: paaco <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@ptrthomas
Copy link
Member

@joelpramos can you create the smallest possible JAR or project where we can see this problem - I'll take a look sometime. in the meantime - do try and debug and make sense of the FileUtils code

@celcius112
Copy link
Contributor Author

hello @joelpramos, the issue came from the different Classloader used by Kareta versus the one used by the spring-loader when launching a bootjar. I have created a PR to resolve this issue, but unfortunately some rework was necessary in order to make it work on windows, which I was far from motivated to do (and I'm sorry for that 😞 ).

We have found another solution, which is to not use a bootjar for our application. Previously, we were putting this fat jar in a docker image, but now we instead layer the image by using jib.

@joelpramos
Copy link
Contributor

joelpramos commented Oct 7, 2020

@ptrthomas I've been trying to go through FileUtils and the Resource file (my current exception is on the method Resource.getStream() so looking at changes there for now). I didn't fully understand all the changes @celcius112 did in his PR but will keep going through it today for inspiration :)

Example here: https://github.com/joelpramos/karate-classpath

  • running in IntelliJ is perfectly fine (i.e. no classpath issues ofc)
  • running the application as a .jar (java -jar ...) doesn't load the feature if it's defined as a classpath feature (see https://github.com/joelpramos/karate-classpath/blob/master/demo/src/main/java/com/example/demo/test/ReproduceErrorLoadingFeature.java)
  • running the application as a .jar and pass a parameter for an externalized feature (-Dexternal.feature="C:\full\path\test.feature") works to load the feature, loads the karate-config.js somehow (still don't understand how) but fails if the karate-config.js calls a feature file (in this case karate/framework-utils.feature) (see https://github.com/joelpramos/karate-classpath/blob/master/demo/src/main/java/com/example/demo/test/ReproduceErrorExternalFeature.java)

The latter is what I'm trying to achieve in my build - external feature files but have a config file and extensions/helper methods pre-loaded.

joelpramos added a commit to joelpramos/karate that referenced this issue Oct 8, 2020
@joelpramos
Copy link
Contributor

Got a fix for the 2nd problem (doesn't seem to address the first) here: joelpramos@8b50606 (there are several comments and System.out.println() just wanted to show you).

Found another problem with the way I'm using Karate in which Nashorn can't load a class from the Spring Boot classpath (this is a pretty good hint .. spring-projects/spring-boot#2823) so I'll be looking into that.

@ptrthomas both of these might not be exactly "bugs" but symptoms of the way I'm using Karate - not in the unit tests running in the machine but packaged in a .jar file in the app. Are you good if I continue to provide updates here? Also let me know if you want me to do separate PRs if/when I find a fix for this additional problem.

@ptrthomas
Copy link
Member

@joelpramos this helps - sorry for not replying yesterday. I'm actually in the middle of a super-ambitious re-write of the core and moving things over to GraalVM refer #1281 - and one of the things I'm keen to do is get the file / classloading right this time. so once I get a chance I plan to look through your log and make sure the new code works and retro-apply whatever possible to develop in the meantime

@joelpramos
Copy link
Contributor

@ptrthomas no problem - this is open source I don't expect an immediate answer :) To workaround the Nashorn issue I exposed a method to allow me to instantiate the Nashorn engine directly. I tried with passing thread context etc but seems like when the parallel runner starts the classpath context is lost. With that new method all I do is after starting my spring applications I call the following line:
ScriptBindings.initNashorn(SpringApplication.class.getClassLoader());

Not very pretty but should also only be use for very specific usages of Karate (or maybe just me .... )

I don't think either change impacts the GraalVM refactor. I ran through the unit tests with no issuess and tested the change in Windows - not sure if there's any unforeseen behavior on Linux... In any case for the main change to solve the first issue I tackled has defensive coding - in case there's no file found using the classLoader.getResourceAsStream() it falls back to the previous implementation (Files.newInputStream()).

Let me know if you're ok with these changes and I'll open the PR. Here's the diff:
https://github.com/intuit/karate/compare/develop...joelpramos:bugfix/callSingle-in-karate-basejs-from-classpath?expand=1

@ptrthomas
Copy link
Member

@joelpramos ok. just one thing - on the rewrite branch I made some changes to Resource and FileUtils - mainly I did not want Resource to need a ClassLoader passed any more and have only one (less confusing) entry point. I would like to add these changes to the develop branch before you proceed, or would you be able to experiment first along those lines to confirm

here's one diff: b27854e#diff-cea3f582a9c266b663188079ae4981b9

also a question for you is that if everything starts out using ClassLoader.getSystemClassLoader() is that a better approach

the PR certainly looks fine, just want to take time to think through this

@ptrthomas ptrthomas assigned joelpramos and unassigned celcius112 Oct 10, 2020
@ptrthomas ptrthomas added this to the 1.0.0 milestone Oct 10, 2020
@ptrthomas ptrthomas reopened this Oct 10, 2020
@joelpramos
Copy link
Contributor

I'll try to merge your changes to those two files to minimize conflicts and test it on my end.

I tried using getSystemClassLoader() and it fails (see here). I haven't found an issue with the thread contextloader() so I'd suggest to stick with that. According to this stackoverflow thread the class itself typically has the correct classloader so I'll probably try that as well. I was a bit inconsistent with it myself as I used the class classloader in HttpClient but not on Resource so I'll review that too.

@ptrthomas
Copy link
Member

@joelpramos great, thanks - I agree that in any case we should expose a method via the API so that one can force-override a custom class-loader at run-time

ptrthomas added a commit that referenced this issue Nov 19, 2020
and stop fighting all the weird jar and classpath loading issues, also should help us
with java modules and future versions etc, over the next few commits will remove the current
resource abstraction and clean up the file-utils
ptrthomas added a commit that referenced this issue Nov 20, 2020
now using the io.github.classgraph lib, for performance we try to use the default classloader
but now we should be able to load from jars and other non-file locations
@ptrthomas
Copy link
Member

@joelpramos I have reworked the resource / classpath scanning code using io.github.classgraph - would be great if you can check if this works in spring boot now

@joelpramos
Copy link
Contributor

joelpramos commented Dec 13, 2020

@ptrthomas is this in the RC for 1.0.0 or is the rewrite branch still separate? Looking to start migrating / testing really soon.

@ptrthomas
Copy link
Member

@joelpramos yes in the RC and everything is now in develop also refer: https://github.com/intuit/karate/wiki/1.0-upgrade-guide

@joelpramos
Copy link
Contributor

Closing the loop - I didn't notice any of my previous issues, tried with feature files in classpath, executed from intellij, compile the jar and execute externally, as well as feature files externalized from the .jar file itself and found no issues with classpath scanning. Seems to be working fine @ptrthomas . Thanks!

@ptrthomas
Copy link
Member

@joelpramos that is pretty excellent news, thanks 👍

@ptrthomas
Copy link
Member

1.0 released

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

No branches or pull requests

4 participants