Visual Studio Toolbox

Modern Web Development

Modern Web Development
5 (100%) 1 vote
(Video Transcript)
Welcome to Visual Studio Toolbox. I’m your host Donovan Brown. Today, were gonna talk about using Espresso Test inside of Xamarin Test Cloud. My guess today is Adam. Adam, welcome to my show and tell what you do here in Microsoft.

>> Well, thanks for having me Donovan.

>> Sure.

>> 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.

>> Okay.

>> 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.

>> Right.

>> And, those devices become obsolete.

>> Absolutely.

>> 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?

>> Absolutely.

>> Okay.

>> So, that was actually one of the big reasons why I decided to join the team.

>> Okay.

>> 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.

>> Exactly.

>> All right, perfect.

>> So, let’s take a look at this.

>> Sure.

>> 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.

>> Okay.

>> 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.

>> Okay.

>> 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.

>> Perfect.

>> 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.

>> Okay.

>> Right, so what this test is designed to do is to go through that same user flow.

>> Okay.

>> 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.

>> Mm-hm.

>> All you have to do to incorporate it, at least add appropriate dependency is this line of code.

>> Okay.

>> 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.

>> 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.

>> Definitely.

>> All right, great.

>> So, just an additional note here.

>> Sure.

>> One other thing that you will have to add is this Report Helper.

>> Okay.

>> 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.

>> Awesome.

>> 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.

>> Incredible.

>> 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.

>> Okay.

>> 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.

 

Read the video

In this episode, Robert is joined by Sam Basu and Ed Charbeneau, for an in-depth discussion about what it means to be a modern Web developer. They cover a lot of ground, including JavaScript frameworks, package managers, ASP.NET Core and how you build a Web solution that relies on a lot of moving parts. They also provide lots of good advice on how you should think about modern Web development, especially if you are new to it.


Comments to Modern Web Development

  • Hey Robert … You and I have a very similar background so I really appreciate this video and your questions. I must say that I find the juxtaposition of the terms "modern" and "assembly language" really interesting ("Modern Web App" and "JavaScript is the Assembly Language of the Web")!I wonder about all the steps needed to build one of these "modern web apps" and how this impacts productivity. I suspect that there are some really big and complex modern apps out there. It would be really interesting the hear from some "really big and complex modern app" developers to get a sense for productivity, testing, and the ability to find people well trained enough to work in those environments.

    burrowsMVP March 15, 2017 11:50 am Reply
  • Why don't update your player. It is old and lack of many stuff and also buggy a little.

    Susan March 15, 2017 12:58 pm Reply
  • @Susan: Can you elaborate on this? What issues are you having? What features would you like to see in the player?Robert

    rogreen March 15, 2017 1:15 pm Reply
  • We need to have the speed control so the users can control the speed of the video

    Gem March 15, 2017 7:06 pm Reply
  • @Gem: Using the HTML 5 Viewer (click on the Format tab to select it), you can then click on the Gear icon in the player and you can play it back at .5, .75, 1, 1.25, 1.5, 1.75 & 2

    gduncan411 March 15, 2017 7:42 pm Reply
  • Is it possible to get the slide deck as a download? Thank you!

    bsubra March 16, 2017 10:33 am Reply
  • The "player" doesn't provide speed controls for Safari on a Mac, but Chrome and Firefox for Mac allow speed control. I didn't mind the length of the video AT ALL, although I do think the time could have been used a bit better. Perhaps, rather than organize it slides -> demo -> slides, there could be a bit more bounce back and forth between the concept (slides) and the practical execution of the concept (demo). Still, this was worthwhile and I really appreciate it.

    Tom March 16, 2017 1:36 pm Reply
  • Where can I get the Angular2 templates (demoed in the video) for .Net Core that work with Visual Studio 2017?

    ADefWebserver March 16, 2017 5:04 pm Reply
  • Thanks for this and that about dotnet crash course.

    edselmalasig March 16, 2017 5:37 pm Reply
  • Wow nice project. Can you change the javascript to byte code so that you can make money of the js framework you guys demo?

    edsel malasig March 16, 2017 6:27 pm Reply
  • Still somethings that I’m not clear on:  So is the project both .Net 4.6 and .Net Core?I would like to see this clarified.  I have an old .Net MVC 4.0 project with a mix of a web service and web API that I would like to bring forward.  I’m willing to make changes, but would still like the process clarified.

    DonaldA March 16, 2017 8:22 pm Reply
  • Hi EdWhat font are you using in your VS Editor?Thanks

    MatthewR March 16, 2017 9:34 pm Reply
  • @MatthewR: The font is Fira Code. I love it, it’s amazing, you can find it at the following GitHub URL. https://github.com/tonsky/FiraCodeGreat question MatthewR!

    EdCharbeneau March 17, 2017 9:08 am Reply
  • @burrowsMVP: There is an awful lot to learn. This episode is the start of the conversation. I will do follow-ups.  Robert

    rogreen March 17, 2017 9:08 am Reply
  • So is the project both .Net 4.6 and .Net Core?

    You can multi-target applications with .NET Core. Yes, it can run both 4.6 and .NET Core in the same application. https://blogs.msdn.microsoft.com/cesardelatorre/2016/06/28/running-net-core-apps-on-multiple-frameworks-and-what-the-target-framework-monikers-tfms-are-about/ 

    EdCharbeneau March 17, 2017 9:10 am Reply
  • @gduncan411 on crhome latest version and win10 even if I select html5 I cannot see the gear nor the time bar. Any idea?

    aljj March 17, 2017 9:38 am Reply
  • @bsubra:Thanks for watching! Here’s the deck: https://1drv.ms/p/s!Av-Y40O6bp1hgoNLbHWxpO1PR84-rQ

    samidip March 17, 2017 11:58 am Reply
  • EdCharbeneau March 17, 2017 3:53 pm Reply
  • but the Kendo grid and UI are not free. At least $1100 per developer?!

    aljj March 18, 2017 3:13 am Reply
  • @gduncan411:I didn’t know this setting was there. No wonder some video on channel 9 I was able to use speed control some I couldn’t. Now, I know 🙂 Thanks for the tip Greg! 

    henryqng March 19, 2017 6:10 am Reply
  • Great video! I would love to see a similar thing that's more server-centric: how you split your projects up between UI / API / Business Logic / Data / Core etc, how you share models, map between objects etc, just generally what that side of your stack looks like. I've seen a couple of different approaches to it, and I would love to see what your guys take is on the current state of affairs for server side architecture!

    Jonny Miles March 19, 2017 8:31 am Reply
  • *snip*You can multi-target applications with .NET Core. Yes, it can run both 4.6 and .NET Core in the same application. https://blogs.msdn.microsoft.com/cesardelatorre/2016/06/28/running-net-core-apps-on-multiple-frameworks-and-what-the-target-framework-monikers-tfms-are-about/ 

    That article is old and I’m wondering if it is still possible with the return to the old project format.

    DonaldA March 20, 2017 5:29 pm Reply
  • @DonaldA: Yes, this is also supported. See: https://blogs.msdn.microsoft.com/dotnet/2016/10/19/net-core-tooling-in-visual-studio-15/ Look for the heading Cross-Targeting you will see XML for adding multiple frameworks.

    EdCharbeneau March 21, 2017 6:34 am Reply
  • Would love to see these kind of videos….

    pavan March 27, 2017 8:04 am Reply

Leave a Comment

Your email address will not be published. Required fields are marked *

Loading...
1Code.Blog - Your #1 Code Blog