Closed melloware closed 4 weeks ago
sounds like good idea to me. whats the migration path? remove -test
but keep it in import scope test?
Any reason to not also provide a artifact named -test
that just includes the non-test one ?
That is a good question. You are saying I could theoretically put all the test
stuff in the runtime
module and poeple could choose whether or not to mark it <scope>test</scope>
or not?
That is a good question. You are saying I could theoretically put all the
test
stuff in theruntime
module and poeple could choose whether or not to mark it<scope>test</scope>
or not?
I also thought about it :) we should try
let me try it!
yes and no - my main question was what the migration path was (if any) and if that was to just remove "-test" then why not just have "-test" include the new runtime one and all is good...
Oh sorry the migration path would be if you use this now.
<dependency>
<groupId>io.quarkiverse.playwright</groupId>
<artifactId>quarkus-playwright</artifactId>
<version>${playwright.version}</version>
<scope>test</scope>
</dependency>
it changes to
<dependency>
<groupId>io.quarkiverse.playwright</groupId>
<artifactId>quarkus-playwright-test</artifactId>
<version>${playwright.version}</version>
<scope>test</scope>
</dependency>
OK it looks like it works! I moved the Test code into the Runtime library and just marked junit5
as an OPTIONAL dependency.
I think that's ok as the testing part is really small and won't be in the target user app. @aloubyansky any thoughts?
You mean the optional dependency on the quarkus-junit5-internal?
Yes
Yep
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-junit5</artifactId>
<optional>true</optional>
</dependency>
What specifically do you achieve with that?
Because we offer Unit testing classes with @WithPlaywright
that are QuarkusTest only but also allow PlayWright to be used as a ScreenScraper. So anyone using it as a Test library will do this...
<dependency>
<groupId>io.quarkiverse.playwright</groupId>
<artifactId>quarkus-playwright</artifactId>
<version>${playwright.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-junit5</artifactId>
<scope>test</scope>
</dependency>
and anyone wanting to use it as a runtime screen scraper can do this....
<dependency>
<groupId>io.quarkiverse.playwright</groupId>
<artifactId>quarkus-playwright</artifactId>
<version>${playwright.version}</version>
</dependency>
Ah, not the internal
one and the user has to still add the dependency on the quarkus-junit5
- sure, makes sense. Thanks.
I was also able to Graal substitute as Playwright uses System.out.println
for logging with Jboss logging!
This will allow using Playwright at Runtime for people who want to screen scrape.
playwright-test
System.out.println
logging with Jboss logging with Graal SubstitutionNOTE: this required me to rename the artifactId for playwright to playwright-test which is a breaking change so this should be a 2.0.0 if we go forward.