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

Unable to export test (version 3.17.2) #1839

Open
TJSWANS300 opened this issue Jun 13, 2024 · 26 comments
Open

Unable to export test (version 3.17.2) #1839

TJSWANS300 opened this issue Jun 13, 2024 · 26 comments
Labels
top priority Issues where the user helped on the codebase or this blocks the main user groups.

Comments

@TJSWANS300
Copy link

Hi.

For Selenium IDE (version 3.17.2), I have a test called Misc/Cleanup.

It is made up of 3 steps:

  • 2 steps have the command run (which call another test)
  • the remaining step has the command close

When trying to export the Test to C# NUnit, the following error shows:

SeleniumIDE error

Could this be down to the Run command inside a test?

@toddtarsi
Copy link
Contributor

toddtarsi commented Jun 13, 2024

Thats a good question. V3 is kinda hitting EOL. I have a recommendation that may help, or may hinder. In v4, I've cut the code export utilities into a standalone CLI tool using npm. Do you have npm on your computer? Basically, you can run code export as it's own utility this way if you do:

npm i -g side-code-export @seleniumhq/code-export-csharp-nunit
side-code-export @seleniumhq/code-export-csharp-nunit ./project.side ./tests                                                     

The advantage to doing this is that the stack trace is viewable and generally there is a lot less technology in the way.
Of course the issue is that some commands like storeXPathCount got the axe going from v3 to v4, but there is a migration utility too:

npm i -g side-migrate side-code-export @seleniumhq/code-export-csharp-nunit;
side-migrate ./project.side ./project-v4.side
side-code-export @seleniumhq/code-export-csharp-nunit ./project-v4.side ./tests-v4                                                     

@TJSWANS300
Copy link
Author

Thanks, I'll look into that

@TJSWANS300
Copy link
Author

TJSWANS300 commented Jun 14, 2024

I still have the same error doing that but we do have more detail:

CMD PROMPT
side-code-export @seleniumhq/code-export-csharp-nunit {Whole path to .side file} ./tests

CMD PROMPT OUTPUT
C:\Users{username}\node_modules\side-code-export\dist\code-export\find.js:46
function findReusedTestMethods(test, tests) {
^

RangeError: Maximum call stack size exceeded
at findReusedTestMethods (C:\Users{username}\node_modules\side-code-export\dist\code-export\find.js:46:31)
at findReusedTestMethods (C:\Users{username}\node_modules\side-code-export\dist\code-export\find.js:53:42)
at findReusedTestMethods (C:\Users{username}\node_modules\side-code-export\dist\code-export\find.js:53:42)
at findReusedTestMethods (C:\Users{username}\node_modules\side-code-export\dist\code-export\find.js:53:42)
at findReusedTestMethods (C:\Users{username}\node_modules\side-code-export\dist\code-export\find.js:53:42)
at findReusedTestMethods (C:\Users{username}\node_modules\side-code-export\dist\code-export\find.js:53:42)
at findReusedTestMethods (C:\Users{username}\node_modules\side-code-export\dist\code-export\find.js:53:42)
at findReusedTestMethods (C:\Users{username}\node_modules\side-code-export\dist\code-export\find.js:53:42)
at findReusedTestMethods (C:\Users{username}\node_modules\side-code-export\dist\code-export\find.js:53:42)
at findReusedTestMethods (C:\Users{username}\node_modules\side-code-export\dist\code-export\find.js:53:42)

Node.js v20.12.2

@TJSWANS300
Copy link
Author

Any update on this?

@toddtarsi
Copy link
Contributor

toddtarsi commented Jun 26, 2024

Ah shoot, no sorry. I first have to figure out a har file thing. However, fixing this should be a lot easier. The stack trace is right there. Can you give me a minimal side file that makes this issue? That will help me fix it faster. I'm sorry, you've caught me in the middle of basically a vacation from OSS.

@TJSWANS300
Copy link
Author

Here is a test side file that uses accounts.google.com with just 1 test

TestProject.zip

@toddtarsi
Copy link
Contributor

Oh neat, basic recursion. Okay, I'll look into it! New core test unlocked

@toddtarsi
Copy link
Contributor

@TJSWANS300 - New version going out now, I think it is quite good at recursion but please let me know what you think.

@TJSWANS300
Copy link
Author

TJSWANS300 commented Jul 1, 2024

@toddtarsi
I've had a look and still having the same error as before :(

Tried using the TestProject file above:

CMD PROMPT
side-code-export @seleniumhq/code-export-csharp-nunit Whole\path\to.side\file ./tests

CMD OUTPUT
C:\Users\{username}\node_modules\side-code-export\dist\code-export\find.js:46
function findReusedTestMethods(test, tests) {
^

RangeError: Maximum call stack size exceeded
at findReusedTestMethods (C:\Users\{username}\node_modules\side-code-export\dist\code-export\find.js:46:31)
at findReusedTestMethods (C:\Users\{username}\node_modules\side-code-export\dist\code-export\find.js:53:42)
at findReusedTestMethods (C:\Users\{username}\node_modules\side-code-export\dist\code-export\find.js:53:42)
at findReusedTestMethods (C:\Users\{username}\node_modules\side-code-export\dist\code-export\find.js:53:42)
at findReusedTestMethods (C:\Users\{username}\node_modules\side-code-export\dist\code-export\find.js:53:42)
at findReusedTestMethods (C:\Users\{username}\node_modules\side-code-export\dist\code-export\find.js:53:42)
at findReusedTestMethods (C:\Users\{username}\node_modules\side-code-export\dist\code-export\find.js:53:42)
at findReusedTestMethods (C:\Users\{username}\node_modules\side-code-export\dist\code-export\find.js:53:42)
at findReusedTestMethods (C:\Users\{username}\node_modules\side-code-export\dist\code-export\find.js:53:42)
at findReusedTestMethods (C:\Users\{username}\node_modules\side-code-export\dist\code-export\find.js:53:42)

Node.js v20.12.2

Does something need updating on my end?

@toddtarsi
Copy link
Contributor

@TJSWANS300 - what do you get for this?

side-code-export --version

@TJSWANS300
Copy link
Author

@toddtarsi
4.0.11

@toddtarsi
Copy link
Contributor

toddtarsi commented Jul 1, 2024

Huh! I'm stumped. I will try with the public binary in tonight. Sorry dude. I mean, there's even a command in the local codebase test:code-export that literally just tests export of script based recursion and dynamic script names.

@TJSWANS300
Copy link
Author

No worries at all.
Thought best to let you know.

@TJSWANS300
Copy link
Author

Any update on this?

@toddtarsi
Copy link
Contributor

Ah, not yet. I'll take a look this weekend

@TJSWANS300
Copy link
Author

@toddtarsi
No worries - thank you

@toddtarsi toddtarsi added the top priority Issues where the user helped on the codebase or this blocks the main user groups. label Jul 12, 2024
@toddtarsi
Copy link
Contributor

I'm taking a look at this this weekend, I'm starting to use a 'top priority' label to prioritize what comes first, and this is on that list.

@toddtarsi
Copy link
Contributor

@TJSWANS300 - Okay, just to be safe, I incremented again and tested locally using the recursion side file here:

https://github.com/SeleniumHQ/selenium-ide/blob/trunk/tests/examples/simple-parent.side#L85

(base) ➜  selenium-ide git:(trunk) ✗ npm ls -g side-code-export
├─┬ @seleniumhq/[email protected]
│ └── [email protected]
├─┬ [email protected]
│ ├─┬ @seleniumhq/[email protected]
│ │ ├─┬ @seleniumhq/[email protected]
│ │ │ └── [email protected] deduped
│ │ └── [email protected] deduped
│ ├─┬ @seleniumhq/[email protected]
│ │ └── [email protected] deduped
│ ├─┬ @seleniumhq/[email protected]
│ │ └── [email protected] deduped
│ ├─┬ @seleniumhq/[email protected]
│ │ └── [email protected] deduped
│ ├─┬ @seleniumhq/[email protected]
│ │ └── [email protected] deduped
│ ├─┬ @seleniumhq/[email protected]
│ │ └── [email protected] deduped
│ └── [email protected]
└── [email protected]

(base) ➜  selenium-ide git:(trunk) ✗ side-code-export ./packages/code-export-python-pytest/dist/index.js ./tests/examples/simple-parent.side ./output-tests
Encountered a dynamic test declaration, including all tests as methods - will bloat code
Encountered a dynamic test declaration, including all tests as methods - will bloat code
Encountered a dynamic test declaration, including all tests as methods - will bloat code
Encountered a dynamic test declaration, including all tests as methods - will bloat code
Encountered a dynamic test declaration, including all tests as methods - will bloat code
Encountered a dynamic test declaration, including all tests as methods - will bloat code
Encountered a dynamic test declaration, including all tests as methods - will bloat code
Encountered a dynamic test declaration, including all tests as methods - will bloat code
(base) ➜  selenium-ide git:(trunk) ✗ 

Seems to transpile fine on latest!

@TJSWANS300
Copy link
Author

@toddtarsi
I've had a look and still having the same error as before :(

Tried using the TestProject file above:

CMD PROMPT
side-code-export @seleniumhq/code-export-csharp-nunit Whole\path\to.side\file ./tests

CMD OUTPUT
C:\Users\{username}\node_modules\side-code-export\dist\code-export\find.js:46
function findReusedTestMethods(test, tests) {
^

RangeError: Maximum call stack size exceeded
at findReusedTestMethods (C:\Users\{username}\node_modules\side-code-export\dist\code-export\find.js:46:31)
at findReusedTestMethods (C:\Users\{username}\node_modules\side-code-export\dist\code-export\find.js:53:42)
at findReusedTestMethods (C:\Users\{username}\node_modules\side-code-export\dist\code-export\find.js:53:42)
at findReusedTestMethods (C:\Users\{username}\node_modules\side-code-export\dist\code-export\find.js:53:42)
at findReusedTestMethods (C:\Users\{username}\node_modules\side-code-export\dist\code-export\find.js:53:42)
at findReusedTestMethods (C:\Users\{username}\node_modules\side-code-export\dist\code-export\find.js:53:42)
at findReusedTestMethods (C:\Users\{username}\node_modules\side-code-export\dist\code-export\find.js:53:42)
at findReusedTestMethods (C:\Users\{username}\node_modules\side-code-export\dist\code-export\find.js:53:42)
at findReusedTestMethods (C:\Users\{username}\node_modules\side-code-export\dist\code-export\find.js:53:42)
at findReusedTestMethods (C:\Users\{username}\node_modules\side-code-export\dist\code-export\find.js:53:42)

Node.js v20.12.2

side-code-export --version = 4.0.12

Does something need updating on my end?

@toddtarsi
Copy link
Contributor

Damn, @TJSWANS300 - Can you post a side file reproduction? I'm a bit confused because yeah this is now part of the core CI:

https://github.com/SeleniumHQ/selenium-ide/blob/trunk/package.json#L25

Basically, this has a recursive test that does some dynamic stuff, and I don't think yours does. I need to figure out that difference so I can make it a core test too.

@TJSWANS300
Copy link
Author

Damn, @TJSWANS300 - Can you post a side file reproduction? I'm a bit confused because yeah this is now part of the core CI:

https://github.com/SeleniumHQ/selenium-ide/blob/trunk/package.json#L25

Basically, this has a recursive test that does some dynamic stuff, and I don't think yours does. I need to figure out that difference so I can make it a core test too.

Here is a test side file that uses accounts.google.com with just 1 test

TestProjectIDE.zip

@toddtarsi
Copy link
Contributor

@TJSWANS300 - Thank you, if I'm caught up on work tonight, I'll take a look. I want recursion to be fully functional in code-export, and will make sure of it.

@TJSWANS300
Copy link
Author

Any update on this?

@toddtarsi
Copy link
Contributor

toddtarsi commented Jul 22, 2024

Nah, sorry. It's one of like four issues with top priority (key-chord support in sendKeys, nested variable paths in sendKeys, multi layer recursion, break-fixing javascript-mocha code-export). It's getting worked on, but I'm kinda shelved for a week or two unfortunately.

@TJSWANS300
Copy link
Author

No worries

@toddtarsi
Copy link
Contributor

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
top priority Issues where the user helped on the codebase or this blocks the main user groups.
Projects
None yet
Development

No branches or pull requests

2 participants