>> Well, thanks for having me Donovan.
>> I am a test cloud engineer on Xamarin here at Microsoft.
>> Okay, great.
>> So, I pretty much help organizations get ramped up with automation testing.
>> Okay, great. So, I’m familiar with Xamarin test cloud, but it sounds like what we’ve done is we’ve added some other types that we support there.
>> Yeah. Yeah, yeah, exactly. So, for a few years we’ve only supported two frame works, Calabash and Xamarin UI test. And just recently we’ve rolled out support for Appium and Espresso, so for today, I’m going to be showing how you can take an existing Espresso test.
>> And make it work within Xamarin test.
>> That sounds awesome, so, I can actually leverage the investment that I’ve already made in Espresso and now, leverage that inside of Xamarin Test Cloud.
>> Yeah, exactly, so, that’s been one of the biggest Crux about it, because if your only limited to a few frameworks you know it kind of Pidgeon holds our testing solution. So, when we open this up to other frameworks that you can take and upload it, makes it a lot easier for customers to adopt Xamarin Test Cloud.
>> Okay, so, before we get too far. We’re assuming people know what Xamarin Test Cloud is. So, why don’t we just take a second right now and tell those who know what Xamarin Test Cloud is, what it actually is.
>> Sure, so Xamarin Test Cloud is a mobile device lab containing thousands of devices. So, where it’s best used at is, when you wanna deploy maybe nightly builds of your testing solution, or weekly builds for regression testing. And, you don’t have every single device that your users, or have to launch your mobile application.
>> Got it.
>> So, you can deploy your test with your APK or IPA, to test code and see how it looks, and see results.
>> Right, and these are, when you say a device lab, these are thousands of physical devices.
>> Thousands of physical devices.
>> Right, these are not emulators or simulators. This is your ability to take your application, actually install it on an iPhone seven, which you might not own yourself, and be able to execute tests against that.
>> Right, because what a lot of companies do, is procure just a ton of devices.
>> And, those devices become obsolete.
>> With Test Cloud, you don’t have to worry about that. We have a procurement team that’s gonna take all the devices, new devices that are coming out on the market. And, they’re gonna be there for you to test.
>> Right, so, I don’t have to worry about having this suitcase full of devices. And not to mention, even if I had all the devices, I would then manually have to go test on all those devices. And what we’re doing is, allowing you to automate that. Because, for those who know who I am, I’m a huge Dev Ops guy and I’m all about automating everything we can and using team services to do that. So, the Xamarin Test Cloud Test connects you the executed as part of my automated build correct?
>> So, that was actually one of the big reasons why I decided to join the team.
>> Like I saw a huge need for automation testing, because prior to this you’d have like a manual tester, a developer with a mobile device connected to his machine or maybe a simulator. And it would have to go through hundreds of user scenarios. This isn’t really repurposable anyway, so with automation, with VSTS, with Test Cloud, you can automate on almost every device out there and save a ton of time.
>> Cool, awesome so show me how it works.
>> Yeah, sure thing so. Here I have an instance of DSCS and I’ve created a couple build agents that we can look through. So, the first two I wanna focus on is XTC weekly and XTC nightly and what XTC stands for is actually is Xamarin Test Club.
>> Perfect, okay, okay.
>> So, we’re gonna be deploying this based on different timing within our Dev Ops Development cycle.
>> Okay, so these are builds that are gonna run either every night or gonna run every week and based on when I run them, I might change the number of tests that I’m going to run.
>> Right, exactly. So, I mean it’s rare when you see a development cycle of a week long. Typically it’s like two weeks or like a month. But, if you wanna test every single scenario that you have in your arsenal, along with every single device that we have in our cloud. You can set that up. So, that’s what this first test is going through. The second test is, if you have a Smoke test. If you see devices that you’re not, that are coming up red, you have errors on, you can target those specific devices.
>> Got you.
>> If you have a certain tests that are passing, as well, you can target those tests. So you can get your results back a lot quicker.
>> Got you. You don’t have to waste time running you know are gonna pass. You can focus on the tests that were causing you issue Choose.
>> All right, perfect.
>> So, let’s take a look at this.
>> If I click into this bill, what am I gonna do is just quickly queue it, so we can see what’s going on.
>> Okay, so queuing a bill is basically telling the system, please go run one of these real quick, right?
>> Right, exactly. So, we have to wait for our hosted agent to spin up, which shouldn’t take too long. I actually have just a few tests as well, that we’re gonna deploy and the mobile application that I have is pretty small.
>> Okay, great. So yeah, the hosted agent, for those who don’t know, our agents that we have in the cloud for you automatically just waiting to do your bill. So you don’t have to install these, they’re gonna be sitting in Azure just waiting for you to do your bills for you. Now, you can also stand up what we call private agents, which is where you actually stand up the agent on your own. And that way you don’t have to wait for us to go find an agent for you. You would just jump on your agent and go ahead and run some builds. Do you have an example of a previous build that’s already run, so we can see what happens at the end of it.
>> I do. So let me go ahead and just navigate to that. So here’s an example of one that was able to deploy in every single step, successfully pass.
>> Okay. So, what’s happening here, once it initializes The agent is gonna grab our source code. And again, the source code is of an Android native application.
>> Okay. And Android Studio.
>> So, I actually have it. If I switch over, this application that we’ll be testing is very simple. It’s just a demo app.
>> And you could see it running on the simulator on the right hand side.
>> So, very one of these cards is a note so you can take notes and its more or less like Evernote but a very slimed down version of it.
>> But if I wanted to create a new note, I would just have to click on this plus sign Say espresso demo and. So, once we have our note we can save it to our list- and that’s basically all a user can do.
>> Right, so what this test is designed to do is to go through that same user flow.
>> Now, with Espresso Test, you can take existing Espresso Tests that you already have built out, tweak it a little bit to run in Test Cloud. And that’s actually what I did with this. So, Android developers out there may be familiar with this gradle, the built.gradle file.
>> All you have to do to incorporate it, at least add appropriate dependency is this line of code.
>> So, whenever a test is being called and this test task is being called, it will automatically build out the right APK file that you need. And then, once you have that enabled you can go into your test itself, add these two lines, it’s basically importing
>> Name spaces for you.
>> Yeah, exactly.
>> Gotcha. So this is pretty cool, cuz I realize that you’re on a Mac, and this is a point where I like to tell people that when we’re talking about Visual Studio team services, it’s not just for your PC, it’s not just for your .net developers anymore. This is for any language targeting any platform, cuz we’re talking about a native Android app written in Java on a Mac being build with Visual Studio team services and run in Xamarin Test File.
>> Yeah exactly, I think that’s the beauty about Dev Ops. Cuz, you can take a lot of different tools from a lot of different areas and Put them all together.
>> And build that pipeline that you need.
>> Exactly, okay cool. So, we make a few tweaks to our test by adding a dependance, adding a name space, and now when I run this build through team services’ CI system. I’m now going to get the APK I need to get then give the Xamarin test cloud, so it can execute my test for you.
>> That’s correct.
>> All right. Perfect. And then, it’s going to go through that exact same flow that you need and verify that that note was actually added and then I can get those results back in my build.
>> All right, great.
>> So, just an additional note here.
>> One other thing that you will have to add is this Report Helper.
>> So, what’s wonderful about this is that it makes the code really easy to read. So, we can see that, we’re on the main screen, we add a new note and every action that we’re performing, it’s going to stop and take a screenshot of this instead of test cloud.
>> Very cool.
>> So, this is the indicator in test cloud or tells take cloud were take a screenshot.
>> Okay, can you show me how that looks in test cloud? How can we see that?
>> Right. So, if I just hop back over, We can go into one of our test. In fact, you can see this validating means that our build that I executed got to that step and it’s already launched. But if we go into a previously launched test and view the results. So, once I enter into a test, it goes to our dashboard which gives us very high level look at some reporting tools. For reporting analytics.
>> I see, so this is the name of the test you ran and these are those markers you put in there with that line of code you were telling us about.
>> Right, so this is more true to test driven developement. So, every single step that a use would take is indicated here, and then, corresponds directly to a screenshot. So, we’re now, it’s just getting launched up. You can see in some of the screenshots. That the app is actually loading. Loading, yes.
>> But once I continue, you’re able to see us entering a text or the title and the text and then saving it.
>> Right. What’s really nice about this is since these are real devices you can actually zoom into one of them. And get much more detailed analytics of what’s going on. So much so that you can see memory usage, CP usage. You can download the device log.
>> And, all this is incredibly helpful for
>> Developes when they want to troubleshoot an issue.
>> Yeah, and allow me to diagnose what’s going on without me having to go run it myself. Or even having to go find one of these particular device to go run the test on.
>> Exactly, so.
>> This is incredible stuff. So now, what we’re doing is we’re allowing you to use Xamarin Test Cloud with, give me the four frameworks again.
>> So, the four support frameworks is Appium Espresso. Thos two are new.
>> And Calabash and UI Test.
>> Perfect. I want to thank you so much for coming on the show and showing us how to use Espresso with Xamarin test cloud. Thank you so much for watching guys, and we’ll see you next time. Thanks.