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

Running Browser tests using Uno.UiTest outside of development code #70

Open
Tree55Topz opened this issue Nov 22, 2021 · 5 comments
Open

Comments

@Tree55Topz
Copy link

I'm submitting a...

Sample app request
Documentation issue or request

Current behavior

Uno.UiTest has documentation regarding how to create tests inside of the same solution where host code lies, but in a lot of cases, UI Automation developers are a part of QA and create their test code elsewhere in a solution outside of development

Expected behavior

If this is possible, have examples of how you could have a standalone Uno.UiTest solution to execute browser based tests

Sorry if this is not allowed, I tried asking a question on the Stackoverflow forum but no response and my team has invested a lot of time in using Selenium to create tests against our uno brower version.

The original SO post --> https://stackoverflow.com/questions/69976830/running-browser-tests-using-uno-uitest-outside-of-development-code

@jeromelaban
Copy link
Member

jeromelaban commented Dec 3, 2021

For now, we are providing support for running tests from within visual studio, using the command line, or using automated tests.

You can derive some scripts to do this from here: https://github.com/unoplatform/Uno.UITest/blob/master/build/scripts/wasm-uitest.sh

GitHub
Unified UI Testing Framework for Uno Platform based applications - Uno.UITest/wasm-uitest.sh at master · unoplatform/Uno.UITest

@Tree55Topz
Copy link
Author

@jeromelaban thats not quite what I am asking. I am wondering if its possible to create a test solution that exists outside of the actual uno/host code for the app. In most cases, UI tests are created by the QA automation team and not the developers.

So I am wondering if the actual test code like identifying elements, creating test scripts, cleanup in between test cases - if all of that can be in its own VS project using the page object model design

@jeromelaban
Copy link
Member

You can setup your environment to use an already deployed application, there's no explicit dependency between the UI Tests projects and the app project itself. Change this to point to the appropriate location:

public readonly static string WebAssemblyDefaultUri = "http://localhost:54490/";

@Tree55Topz
Copy link
Author

@jeromelaban ok thank you - we will have to test it out. Do you know of any reason why just using Selenium would be a bad idea? We already have built up a decent amount of selenium code to test the Uno version of our app and the biggest challenge is just identifying elements as the HTML code that gets generated is quite ugly and complex.

@jeromelaban
Copy link
Member

You can use selenium directly, but it won't change anything with the naming of elements. You can name elements with what is documented in the readme of this repository.

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