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

How to make multiple configurations with gradle plugin? #749

Open
ildar2 opened this issue Feb 3, 2023 · 3 comments
Open

How to make multiple configurations with gradle plugin? #749

ildar2 opened this issue Feb 3, 2023 · 3 comments

Comments

@ildar2
Copy link
Contributor

ildar2 commented Feb 3, 2023

We need to define several configurations to be able to launch different sets of tests. Afaik you can define multiple Marathonfiles, but is it possible to do it with gradle plugin?
I've tried to define two marathon {} blocks, but it only executes the last one.
And how one would launch different configs?

@Malinskiy
Copy link
Member

This is partially possible with dynamic configuration. I would just use CLI for this use-case and store multilme Marathonfiles for better visibility

@ildar2
Copy link
Contributor Author

ildar2 commented Feb 3, 2023

Thanks for the quick feedback!
So basically I need to create a gradle task that would build test apks and then run cli "marathon -m Marathonfile1-2"?

Also is there a way to configure size [small | medium | large]? edit: found it (not working tho: CustomMessageMissingMethodException: Could not find method set() for arguments [size, small] on {} of type java.util.LinkedHashMap.)

@Malinskiy
Copy link
Member

That's not what I meant. You can configure gradle to use parameters as filter queries and pass in those using gradle: https://docs.marathonlabs.io/configuration/dynamic-configuration#gradle. For example you can configure a FQTN as the parameter or a regex.

A much better option would be not to use gradle at all for testing and use CLI version. This way you can store as many testing configurations as needed in the form of many Marathonfiles.

For running annotated tests (small/medium/large) you can use https://docs.marathonlabs.io/configuration/filtering#annotation as a filter

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

No branches or pull requests

2 participants