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

Using datatable with test option for batch test automation #348

Closed
kurawadiprasanna opened this issue Feb 27, 2019 · 8 comments
Closed

Using datatable with test option for batch test automation #348

kurawadiprasanna opened this issue Feb 27, 2019 · 8 comments
Labels

Comments

@kurawadiprasanna
Copy link

After the completion of chrome based test execution, it is not terminating the execution flow. It hangs off. Please advise.

@kensoh
Copy link
Member

kensoh commented Feb 27, 2019

Have you tried the flow sample 6 on datatables to see if they work for you? Running both commands below in src/samples/6_datatables folders work as expected, quitting after 3 iterations.

tagui 6A_datatables page_data.csv
tagui 6A_datatables page_data.csv chrome

Link to the datatable and other flow samples - https://github.com/kelaberetiv/TagUI#flow-samples

@kensoh kensoh added the query label Feb 27, 2019
@kensoh kensoh changed the title not able to terminate Test Execution using Datatable Not able to terminate Test Execution using Datatable / using TagUI for test automation Feb 27, 2019
@kensoh
Copy link
Member

kensoh commented Feb 27, 2019

Adding on to above, below has more useful info on using TagUI for test automation - https://github.com/kelaberetiv/TagUI#testing

Although it can be used for test automation, there are way better frameworks and tools designed specifically for test automation. Recommend to check out those specialized tools.

@kurawadiprasanna
Copy link
Author

tried with both 6A and 6B datatables. it is still not working. PFA for the link below for screenshot.
https://drive.google.com/file/d/1eOrSuZAnKBuwdGiYA_Yzg-no--AQmRtu/view?usp=sharing

kensoh added a commit to tebelorg/TagUI that referenced this issue Mar 5, 2019
details of issue here - aisingapore#348

when datatable is used with test option, execution hangs after the first iteration. this is because casperjs test mode treats every parameter as in input file to test. when the datatable parameter is passed to casperjs it hangs because it is not a valid test js file. modified tagui and tagui.cmd to not pass parameters to casperjs in test mode.

technical details here - http://docs.casperjs.org/en/latest/testing.html#arguments

`The casperjs test command will treat every passed argument as file or directory paths containing tests. It will recursively scan any passed directory to search for *.js or *.coffee files and add them to the stack.`
@kensoh
Copy link
Member

kensoh commented Mar 5, 2019

Thanks Prasanna, I get it now, you mean running in test mode. I made PR #352 with below comments -


details of issue here - kelaberetiv#348

when datatable is used with test option, execution hangs after the first iteration. this is because casperjs test mode treats every parameter as in input file to test. when the datatable parameter is passed to casperjs it hangs because it is not a valid test js file. modified tagui and tagui.cmd to not pass parameters to casperjs in test mode.

technical details here - http://docs.casperjs.org/en/latest/testing.html#arguments

The casperjs test command will treat every passed argument as file or directory paths containing tests. It will recursively scan any passed directory to search for *.js or *.coffee files and add them to the stack.


Prior to merging, you can download from below repo, unzip, and replace contents under src folder. The files changed are tagui and tagui.cmd under src folder. Do a backup if you have made your local modifications to code.

https://github.com/tebelorg/TagUI/tree/datatable_test_mode

However, there are better and mature tools for test automation out there for evaluation. Even if above works, the generated .xml file will only capture the test result from the final iteration (unless you write custom code to save each iteration result somewhere).

@kensoh kensoh added bug and removed query labels Mar 5, 2019
@kensoh kensoh changed the title Not able to terminate Test Execution using Datatable / using TagUI for test automation Using datatable with test option for batch test automation Mar 5, 2019
kensoh added a commit to tebelorg/TagUI that referenced this issue Mar 5, 2019
support datatables in test mode

details of issue here - aisingapore#348

when datatable is used with test option, execution hangs after the first iteration. this is because casperjs test mode treats every parameter as in input file to test. when the datatable parameter is passed to casperjs it hangs because it is not a valid test js file. modified tagui and tagui.cmd to not pass parameters to casperjs in test mode.

technical details here - http://docs.casperjs.org/en/latest/testing.html#arguments

`The casperjs test command will treat every passed argument as file or directory paths containing tests. It will recursively scan any passed directory to search for *.js or *.coffee files and add them to the stack.`
@kurawadiprasanna
Copy link
Author

it is working fine with the fix provided. Thanks @kensoh

@kensoh
Copy link
Member

kensoh commented Mar 6, 2019

no probs Prasanna 👍, i keep the issue open until the PR is merged into TagUI master by @ryzalk

@kensoh kensoh reopened this Mar 6, 2019
@kurawadiprasanna
Copy link
Author

kurawadiprasanna commented Mar 6, 2019

sure @kensoh

kensoh added a commit that referenced this issue Mar 19, 2019
* support datatables in test mode

details of issue here - #348

when datatable is used with test option, execution hangs after the first iteration. this is because casperjs test mode treats every parameter as in input file to test. when the datatable parameter is passed to casperjs it hangs because it is not a valid test js file. modified tagui and tagui.cmd to not pass parameters to casperjs in test mode.

technical details here - http://docs.casperjs.org/en/latest/testing.html#arguments

`The casperjs test command will treat every passed argument as file or directory paths containing tests. It will recursively scan any passed directory to search for *.js or *.coffee files and add them to the stack.`
@kensoh
Copy link
Member

kensoh commented Mar 19, 2019

Committed to master and closing the issue. Users can download the cutting edge version to overwrite their package installation to use this feature - https://github.com/kelaberetiv/TagUI#set-up

@kensoh kensoh closed this as completed Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants