Presented:Richard Hundhausen
In this video, Richard Hundhausen shows how to use .NET Framework code to customize coded Web tests to record a series of HTTP requests that validate the functionality of a Web site in Visual Studio Team System.
The following text is a software generated transcript of the video. Click on a minute link to jump to a location within the video
Minute 0
Below minus Richard 1000 of a principal consultant with accessing a Microsoft regional Director and Visual Studio team system MVP is less articulate coded web tests assess his unit were great way to record a series of HDTV requests at the back expecting some bizarre results were just walking through a series of links on a website and getting testing at all if one automates the process to do over the web and will products or register a new user battles without operations that can be validated to pacify well as you know these requests he reported using the websites for quarter as the flaw in your browser and watching watching your doing record requests sitting in back into web test file so that you can execute the tests as you have surface there are sometimes hourly to go deeper than once at work and life into Italy to work from the net code situation is the focus or less
Minute 1
This or I propose a new website for issues filesystem Visual Basic or call this my site live in a parish is the personal website starter kit is a great starter kit you can use the Seattle in ASP net 2 0 website is a lot of common themes after pages personalization databases the ability to have people register and save them in SQL express love and best practices to be actually deciphered by looking at the code generated by this website starter Kit will take a quick look at what it does for right click view in browser and concurrently with his feet on a development server you can see that it has chosen 26 allies or ports and it s the sort of concert footage so you re welcome to my site is a lot of those for personal sites in the web
Minute 2
Stays in plays host to resume some of your favorite links in a photo albums with galleries and photos inside the salaries is scheduled to play with our tester a few moments was close at the return of Visual Studio notes that the website is still running so being served by the development server port 2609 I is the moment don t have a web test and let my solution hair triggers a right click I can add a new test for new item of tests identified it is better to have a whole new projects keeping his name separately organized separately on the solution of a right click is a having projects will choose Visual Basic test is our template just projects and will call us by cites tests and will also place as a mercy drug projects of all the organization
Minute 3
Probably create a website for a test project that is seen some of these defaults files that are generated through the offering test txt file which shows the basics on how to open and view and run tests and sometimes you get a CD full unit tests in here and there was also the fall manual tests this for me crazy for longtime hundred tools options you should come down here to the test tools under test projects and you can tell migrating to Visual Basic test project don t give me those files when he warned absolutely such guidance screen uncheck this box is keeping the last quarter is privately these files as well as the on the project of additives asked record websites now personally I prefer to stay at new item testified in this case and then choose a web test a something like my
Minute 4
Welcomes us recently as a Avenue chastity to the given name I didn t have latest shows right click add websites to implement web test one can always rename it elected us do once in the beginning enters a reporter mentioned earlier the website for quarter issue runs inside of your browser is actually what s known as a fix for more internal rot here at his watch as requested negative and records and leaders for a package web test file she coming to bourbon here you re thinking what was in your elegant ultra at times you can bring us all the server back up to show the details of dialogue that reminds you what s being served what location what work number that gives you a URL or just click this election bring it up in the browser longer free to steal the URL and very much whose I sat down and it faces imminent with a page
Minute 5
Here we are recording a web test in their first request to the main page news reported that requests a module right of the photo albums and threatened to myself while you re now the content behind here is as you can see how some references to the tennis to ping pong the coasts and the flower photographs I don t want reporters request right now I want to edit coding my webcasts wouldn t do it in a more data driven fashion selection look at the code or the HMO in response of the stage here in the trouble through all the HREF have on its own list office pop accurate to my webcasts because it s a bit and was run through my test for quick pretty simple using to pass and hear the request is made in the response information can actually see here
Minute 6
What the browser sees you can look at the request header and body in the response header and body greatness wonderful read close down and they giggled and that the toolbar button finishing what if you run the tests have been a source of the credentials at a new recording set of plug in for the Web test plug in for the request is orbital to it actually generates code on one time only as a one time only because what to generate the code of student as I keep it in me wet sex violence in school do have a look at the thought of tests and generate some VB code for us it was the naming conventions is to take the name of your Web test and put the work code at the end of the straight and converted over its VB code here making all the crux import statements the Web test request objects setting properties like think time and actually yielding as
Minute 7
Sending it back to the the the testing harness this case because the window of the results of requests and reports of the code I might just mention here that a lot of things you can tweak in the designer for example on the my site the first request your rental properties window for a four run to bring us up because of a lot of properties in your new method get versus post will record the results the response time goal think times the URL one version of a sheep year we getting things like that so it thinks off by one change this to a shorter fix three seconds of this really comes into play when we put Web test load and you can actually see the note 3 seconds for a standard human being to look at the page and decide what bought or what hyperlink click so that son of a coded web tests that time actually shows up as a
Minute 8
Property or so request for the big time equals 11 requests you don t think Sun equals three etc etc you can see all the different morals or you should have more space to look at this and other similar big time zeros to the Montenegrins overload and only care about how long it takes for standard persons in to the page as I would like to go to next what IntelliSense shows to remember to comply with the common ones and all the members you get a lot of interesting properties of the body for exactly get a body and get information about the key value pairs on the request itself client certificates may be the request are making over requires five certificate for authentication cookies collection on the spot if you has properties in your neck of requests to certain attributes about the page that have cookies
Minute 9
Headers and slickness of the timeout for example gets a timeout whole wheat on request for funding out a positive feeling the tests in the URL you can have all of these things and code which really increases the flexibility websites that offer some example code you re as you were talking from the toolbox is like a good presenter at my code vertigo so after I make my request of the album and then take that last response was to be the response you would hereby request three family go through each tag as a Chanel tag objects in the bucket filter HTML tags collection is really wonderful credit rip through and render our salvation of age and it has to do with the attacks and rid HREF the images things like that of the
Minute 10
Regional support in net script so I could get each a sagging anchor tag I wanted it as attribute value a href others in the anchor tags that service anchors for dropping down the position of the page the classic anchor that actually takes you to a page which the photos are album due in and just to be verbose or I say it is not a hand if the convert to lower contains details as PX coma Monday was a hacker could probably use a construction here to make as little cleaner boast one of extra inches H Russ the jump to specific details on how were just photographs them is pretty new requests which is to be my local host one to three for my sites in the joint of the HREF to the actual value of the tag is because the anchor in anchor text or reference relative pages of not absolutely sought to join up to you when you arrive here with you
Minute 11
Page in a yield that request back to the harness to test your information will say this was going to run us think exactly right including his run of DB file either the halves of you coded web tests but if you do bring up the tests window the test view window you ll see that it appears another test in your business is a class that inherits from the crux of the costs it shows up in here with the right attributes so you should highlight this and run a story progress running a test right now at info double click the results you can see Rigas the first to request work fine and that therefore request the constituent requests based on the HREF have on this page fails and actually intended to happen want to show you that it s because I hardcode the wrong port number and
Minute 12
You didn t like that this is a very common question I get on kick teaching and consulting is either how I know what the port number is maybe more importantly how it essays he got headphones to rapid change and armies off a question initially on Quebeckers your solution on the my site does highlight the projects you should tell to not use them at ports of right now except as set to true by default so whatever if you the server feels like a unit for a guy like that from a anti hacking when you are always guessing at what the port number is a the own systems for 8100 own tests or build websites and Web services that call this thing visually hard inventory for hardcode 26 on the enemy comebacks my Winchester and do the same just as demonstration is probably a lot
Minute 13
Are ways to do this you can come up with status and will rerun it and so whether I just passed to the results you can see that s in addition to the three hardcoded requests the next four were done dynamically based on the anchors and HREF have returned in the page s response this is one example of how you can go underneath into the code and do some really creative things to do moving through active directory and hits the Microsoft message queue to look up something or possibly offer to you in a database news radio it was really no limit to what you can do it for synchronous lesson in a much richer as a principal consultant except it
Click here to go to original video page
Wednesday, July 9, 2008
Video: How Do I: Use .NET Code to Customize Coded Web Tests?
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment