fsprojects / canopy.mobile Goto Github PK
View Code? Open in Web Editor NEWCanopy testing framework for mobile apps
Home Page: https://fsprojects.github.io/Canopy.Mobile/
License: MIT License
Canopy testing framework for mobile apps
Home Page: https://fsprojects.github.io/Canopy.Mobile/
License: MIT License
We need a getting started guide.
Need any other help?
On a website, I tried to:
Does Canopy.Mobile work only for mobile applications?
I would expect to be able to use it for websites automation too.
canopy.mobile.Exceptions.CanopyException was unhandled by user code
Message: An exception of type 'canopy.mobile.Exceptions.CanopyException' occurred in canopy.mobile.dll but was not handled in user code
Additional information: Failed to click "#Location", because it could not be found.
Did you mean?:
["Boston"; "Houston"; "button"; "section"; "Austin"]
Is there a cloud based (browserStack) type connectivity support for Canopy.Mobile ?
Below is from BrowserStack.com
"
Testing mobile applications on real devices is a must. Even Google and Apple recommend doing so before submitting apps on the Google Play and App store.
An optimal way to get maximum coverage is to use a cloud-based testing product like BrowserStack, which provides access to 2000+ real devices across iOS and Android.
"
Thanks.
I have seen the web tests for canopy using C#. is it possible to write tests for mobile development also using C# ?
I have Downloaded attached "Canopy.Mobile" Sample Project. but not able to run the Code.
What all setup I have to do Please guide?
Should the project focus initially on Android and eventually support iOS, or should it support both from the start?
When a find operation times out we should capture a screenshot and trace other avaliable elements.
@lefthandedgoat is there already a special way how canopy proper does it? I personally would use a configuration variable for the path and just activate this by default. It's probably also important to trace other elements that we can find on the page.
@part-timeDev this is particularly important on the CI. Do we already know if we can tell gitlab that we have special artifacts?
canopy was the first major piece of code that I wrote in F#. At the time I was not aware that you were supposed to shy away from infix operators. I used them for a reason though. After contributing to a different 'English style' DSL for web testing, and working with the less technical QA folks, I realized that English didn't make the code easier for them to write, it made it harder. They wanted to phrase sentences in the way they want to, and not what was legit code.
I chose to use infix operators because they would be foreign to the QA people and I could simply tell them to memorize these few funky characters to do specific operations. No confusion with English terms anymore.
I also provide equals a b
as an alternative to a == b
for those that prefer it, but I don't think many use them.
I guess the question is, should you keep the infix operators, move away from them, or support both.
In order to fight flakiness we have clickAndWait helpers that take one selector to click and one to wait for after the click. In order to make it more useful in real world scenarios we should check that the wait selector does not match before we click. Otherwise we would not detect it page transitions
Can this be run against a physical device?
I see AVD in the configuration, suggesting it only runs with simulators for now.
Is this project tied to Android - how could I use with UWP using WinAppDriver?
Happy to have a go at adding if not already possible
259fa0d#diff-6074983490330a0aac1bd23c958232d7R89
You switched from "sdk" to "android-sdk". I had a sdk folder but not android-sdk folder. It does not work with just sdk either.
I installed with the latest Android Studio package. Is there something else I need to install? I also created a hello world app, and installed API 23 (Marshmellow I think) and created an emulate for Nexus 6 because it seemed to be breaking on Nexus_6_23 and it launches from the IDE, and I get beyond that error now.
Here is the trace of where it is failing when I modify the path back to sdk fyi:
Finished Target: InstallAppium
Starting Target: RunTests (==> InstallAppium)
C:\projects\Canopy.Mobile\tests\Canopy.Mobile.Tests\bin\Release\Canopy.Mobile.Tests.exe --sequential
app C:\projects\Canopy.Mobile\tests\Canopy.Mobile.Tests\bin\Release\temp\ApiDemos-debug.apk already exists
Error: Environment variable HOME is not set.
Unhandled Exception: System.ComponentModel.Win32Exception: The system cannot find the file specified
at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
at canopy.mobile.core.quit() in C:\projects\Canopy.Mobile\src\Canopy.Mobile\Canopy.Mobile.fs:line 93
at Canopy.Mobile.Tests.main(String[] args) in C:\projects\Canopy.Mobile\tests\Canopy.Mobile.Tests\SampleTests.fs:line 127
/cc @sergey-tihon ;-)
any plans/work underway to support dotnet core?
Is there a Travis VM or something that can do .NET and android?
@lefthandedgoat can you please port the canopy code around levensthein? Thx
canopy can only run tests in one browser at a time because it uses a global mutable instance of the browser. It makes the api really nice but more advanced users want to run more than one test at the same time.
The easiest way for them to do this is to simply parameterize their console app to run a subset of tests, or with different browsers, and run the console app more than one time.
Some people (not many) want true parallel support in the same process. This is not hard to do, as you can add an instance of the browser/simulator as a parameter to ALL function calls, but obviously this makes the api kind of unpleasant.
You can support 2 apis, one that is nice and clean, and one that is less clean but allows for parallel.
This may not be a big problem for android/ios though because starting the simulator is so expensive.
Currently this testsuite still fails on our internal gitlab for timing issues. I assume we need to wait until the app is uploaded after every test. @lefthandedgoat us this possible?
In https://github.com/fsprojects/Canopy.Mobile/blob/master/tests/Canopy.Mobile.Tests/SampleTests.fs#L136 I tried to select a edit box. Unfortunately it doesn't match and I don't know what to do.
@lefthandedgoat any ideas?
Creating a console based test runner is actually pretty easy and I have 2 working examples, one in canopy, and a parallel enabled one called prunner.
They offer a lot of pros but offer some cons.
##Pros
Simple and easy to make
Console is actually really powerful and well supported in various CI environments
##Cons (all of these do not bother me but frequently come up in issues on canopy)
No VS integration
People generally aren't as familiar with how to use console
You have to roll your own 'tags' for tests so that you can run subsets etc
Not xUnit/nUnit/the testing library they are used to
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.