Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.
wk.exe browser session termination
LegacyForum
Posts: 1,664 ✭✭
We are using wk.exe to automate web app testing. Our web app uses a session cookie, which ends the session when the browser is closed. We would like one test/project to login to the web app and not close that browser session. Additional tests/projects need to run in the logged-in browser session. This works with the GUI, but wk.exe ends the browser sessions immediately after each project is finished. Support has informed us that the Cookie tab doesn't work with AJAX functional testing.
Is there any way that wk.exe could leave open or control the browser session between project runs? We are doing AJAX functional testing.
Is there any way that wk.exe could leave open or control the browser session between project runs? We are doing AJAX functional testing.
0
Comments
-
Hello Alex,We are using wk.exe to automate web app testing. Our web app uses a session cookie, which ends the session when the browser is closed. We would like one test/project to login to the web app and not close that browser session. Additional tests/projects need to run in the logged-in browser session. This works with the GUI, but wk.exe ends the browser sessions immediately after each project is finished. Support has informed us that the Cookie tab doesn't work with AJAX functional testing.
Is there any way that wk.exe could leave open or control the browser session between project runs? We are doing AJAX functional testing.
If I am understanding your scenario correctly, you have a test that logs in to the web application. You then have additional tests saved that rely on having a user logged in before running. When running this in the GUI, the browser stays open, so your session stays valid while you close the login test and open up additional tests. However, when running this from the command line, the session does not stay open from project to project.
If this is the case you are describing, then you will need to create an additional project that uses Test Suite References to reference these other projects into one project:
1. File->New->Project->Empty Project
2. From the Tests tab, right click the Test Suite and click Add to Project->Add Test Suite->Reference Test Suite
3. Browse to your login test and click Open
4. Repeat steps 1 and 2 for additional tests that require the login.
Save this project, and run this project from the command line.
I am still confused about how you are creating these additional test projects if they require a login. Are you recording the login process and then deleting these login steps from your additional test projects?
If I have misunderstood your questiom, please try and clarify it for me,
Thanks,
Reepal0 -
Your solution is elegant and works well. Reference projects are well documented in the users manual, but I was searching for CLI browser session and projects don' t mention this.
I generate test suites in a logged in browser session since WK GUI doesn't always close its spawned browser.0