Skip to content

feat(pycharm): add configuration screen with variable, environment variables and testsuite file support #431

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

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

hasanalpzengin
Copy link

@hasanalpzengin hasanalpzengin commented Apr 18, 2025

Related with the Task #417

This update introduces a visible and functional configuration for test items, enhancing the overall usability of the PyCharm plugin:
Adds new fields to the configuration page for PyCharm:

  • environment variables: to pass into the commandline interface as environment variable if given.
  • variables: robot variables that will be passed to the execution with -v flag. Seperated with comma following the format:
    key1=value1,key2=value2 if given.
  • additional arguments: any arguments that can be passed to the execution if given.
  • suite path options: suite path to select. It will be converted to TestItem and added to the execution with --by-longname if given.

UI View:
image

- environment field
- variables
- additional arguments
- suite path

Signed-off-by: hasanalpzengin <[email protected]>
@d-biehl
Copy link
Member

d-biehl commented Apr 29, 2025

Sorry for the late reply, I needed some vacation from RobotCode ;-)
But, your PR looks really good!!! I need a little more time to take a closer look at it though.
What I do notice is that I would like to be able to execute individual test cases, not just one, and not just complete robot files. This already works, but it is not yet possible to select the test cases in the RunConfig. Maybe you can find a solution?

@hasanalpzengin
Copy link
Author

@d-biehl multiple testcases would already be available with comma seperation in includedTestItems field. However maybe it's a problem of UX, therefore I have changed the field to a CheckBoxList from Jetbrains library for a modern look:
image

However I ask for your opinion about the test suite field. Would you like to keep it or remove it and leave all decision to the Test Items checkbox list ?
Currently both fields remains this means:
if you select a test suite path. We'll only run the tests from this file. However it makes the usage of Test Items list a bit obsolete because if the path is selected, all tests in the given suite path is appended to the selection no matter if they were selected or not.

@hasanalpzengin
Copy link
Author

Hi @d-biehl,
Are you open to merging these changes?

I really appreciate your work on this project and wanted to contribute because I noticed that PyCharm support is progressing a bit slower compared to VSCode, and there are still several TODOs open. Of course, as the project owner, you have every right to reject contributions if they don’t align with your goals.

That said, I'd like to avoid investing further effort into keeping the PR aligned with upstream changes unless there’s interest in moving it forward. I’d be grateful for your feedback—whether it's a review, suggestions for changes, or a decision either way.

Thanks!

@TianSen-Git
Copy link

oh ,this is very good ,includedTestItems ! it can select one two or all . i just want it ,i very very need it !

@hasanalpzengin
Copy link
Author

Thank you for the comment @TianSen-Git. I unfortunately closed the PR because of not-availability of @d-biehl. If you are interested I can share this version of the plugin. I am already using it locally and I'm very happy with it.
I'm currently developing the python debugging functionality to the pycharm part, I can re-think of opening the PR after that if Daniel turns out to be more responsive.

@TianSen-Git
Copy link

Thank you for the comment @TianSen-Git. I unfortunately closed the PR because of not-availability of @d-biehl. If you are interested I can share this version of the plugin. I am already using it locally and I'm very happy with it. I'm currently developing the python debugging functionality to the pycharm part, I can re-think of opening the PR after that if Daniel turns out to be more responsive.

i want it, hao can i get this .

@d-biehl
Copy link
Member

d-biehl commented Jun 5, 2025

Thanks again for your work, and sorry that it's been left unattended for so long. There are currently other tasks that need to be dealt with first (just to mention RF 7.3, Robocop 6, and ongoing issues with the PyCharm Marketplace, etc.).

In principle, the ideas in your PR are good, but the wording doesn’t quite fit, and I think that simply displaying a list of test items could quickly become confusing in larger projects. My idea would be to still show a list of selected test items, but have the selection done via a separate button. When you click it, a new dialog with a tree view would open, where you can choose the test items.

The core idea I'm actually aiming for—though it's not fully fleshed out yet—is something like a Test Explorer view, similar to what's available in VSCode. There, you can select test cases and have a Run/Debug button, so you don’t have to keep creating new run configurations. Instead, you have one reusable configuration.

Since I mostly work on RobotCode alone and usually only in my spare time, it can sometimes be hard to balance regular work, private life, and work on RobotCode. That means things can sometimes sit around a bit longer. But that doesn’t mean I’m not looking at them or not interested—it might just mean that I don’t have the mental capacity at the moment because there’s already so much else going on in my head.

However, if you close the PR, it disappears from my to-do list and I might forget about it. So feel free to leave it open—if I get to it later and it no longer merges cleanly with the main branch, that’s totally fine. I’ll let you know or do some cherry-picking.

So please don’t get frustrated or discouraged—just leave the PR open until I’ve had a chance to comment, and feel free to ping me every now and then.

I’ll go ahead and reopen the PR now so it doesn’t disappear from my list.

@d-biehl d-biehl reopened this Jun 5, 2025
@hasanalpzengin
Copy link
Author

@d-biehl have you thought of having few more maintainer for the project ? There are already a lot of experts in the Robot Framework Slack, maybe you can be open for that. I am well aware the difficulties of trying to maintain this project as a single person but this doesn't mean it should be maintained by one person at least it could be split-up into different components such LSP, VSCode and Pycharm.

@d-biehl
Copy link
Member

d-biehl commented Jun 5, 2025

Sure, I'm definitely open to sharing the project responsibilities – and I've actually tried a few times already. Unfortunately, with only moderate success. In our niche, there are lots of great testers, but very few developers who are comfortable working across multiple programming languages and who have the time and motivation to dive deep into the architecture of Robot Framework, LSPs, tooling, IDEs, CI, and so on.

So far, most contributions from the community have been small – a bug report here, a documentation fix there, or the occasional feature request. Honestly, you're the first one who's submitted a larger PR, which I really appreciate!

One of the other big challenges is reliability. I've talked and chatted with several people, and often there are great ideas in the beginning – but then nothing happens. I'm sure you know what I mean.

Don't get me wrong – just because someone submits a PR doesn't automatically make them a maintainer 😉. But if you're interested in continuing to contribute: please do! From your profile, it looks like you're in the same time zone, so maybe we could even jump on a call or video chat sometime in the evening to exchange ideas. That’s often easier than back-and-forth over GitHub.

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

Successfully merging this pull request may close these issues.

3 participants