So, I've came up with a task of performing a basic load test of a web service. For that purpose I've chosen the WebTest of Visual Studio 2010 Ultimate Test Project. For the most part as long as only GET requests were performed everything was pretty straightforward.
But there was one POST request that requred a file upload. A little googling led to this blog entry which describes the situation in detail. The only problem was that recording of the file upload didn't work. It didn't record anything at all, to be more correct. I guess that's because I'm in the end of 2013 and using Windows 8 and IE 10, and this breaks it somehow (you know, Windows 8 breaks a lot of things).
So basically situation is pretty dumb: you can't add "Form Post Parameters" to your POST request with a right click menu. Why (it's a rhetorical for Microsoft, I know)? And the only semi-official solution doesn't work, and it's pretty dumb solution, I might add.
The solution is quite simple however. A .webtest file is a XML, which utilises a http://microsoft.com/schemas/VisualStudio/TeamTest/2010 schema, which is located at %VsInstallDir%\Xml\Schemas\vstst.xsd. Using that schema it wasn't hard to find required tags. To create "Form Post Parameters" create a new POST request ("Add Web-Service Request"), save, and reopen .webtest as XML file. In the tag <Request> insert child elements:
<FormPostHttpBody>
<FormPostParameter Name="dummy" Value="test1" RecordedValue="" CorrelationBinding="" UrlEncode="True" />
</FormPostHttpBody>
save and close. Now you can reopen webtest with it's standard editor, and voila, you have the parameters, you can now right click on it and two new options apper in menu, inluding "Add File Upload Parameter" which is that we need. Everything else is already described in blog entry mentioned above.
Showing posts with label Visual Studio 2010. Show all posts
Showing posts with label Visual Studio 2010. Show all posts
Sep 26, 2013
Sep 2, 2011
Python Tools for Visual Studio 2010
There is an incredible product available to all of us. Not only it's extremely nice to have Python language in VS, but to me no less important that it's also open source. There is a lot of open source code, but I think this one is specifically valuable since it covers a lot of aspects of VS integration at all levels, and it's from Microsoft.
P.S. some videos on features.
P.S. some videos on features.
Aug 18, 2011
.BAT file syntax highlight in Visual Studio 2010
Looks nice, isn't it? All thanks goes to TextHighlighterExtensionSetup (yes, that's a name). It also will add syntax highlight to some other types, including INI files and PowerShell script. The only hassle is that you need to install IronPython 2.6 for .NET 4.0, yet the latest version is 2.7 but add-in will not work with it (as of now).
Aug 16, 2011
If C/C++ IntelliSense is not working in Visual Studio 2010
If C/C++ IntelliSense is not working in Visual Studio 2010, not even creating it's 'ipch' folder, and you are happen to still use almost obsolete Windows XP, then you will be surprised as much as me, since it's, in fact, a Microsoft bug, which was introduced by recent bunch of updates to WindowsXP SP3.
I found it almost by chance, since there is a lot of other reasons for broken IntelliSense. I was lucky not going thru all of solutions and ultimately become extremely frustrated since none of them would work.
I found it almost by chance, since there is a lot of other reasons for broken IntelliSense. I was lucky not going thru all of solutions and ultimately become extremely frustrated since none of them would work.
Aug 8, 2011
Complexities of C/C++ development in modern world
I have not worked with C for a very long time, until recently, then I started DiggerC project. Working with .NET all last years I've took for granted it's all the benefits this architecture gives you. Going back to pure C is like a fresh shower. I'm talking not just about manual memory management, it's least significant part. The most significant thing, that I realized almost immediately — you are almost alone with a C Standard library and a WinAPI. There is just no convenient mechanism for creating reusable libraries in C. At best you can find something like this, but no more. The other part is code manipulation. The .NET 1.0 based Visual Studio .NET (i.e. 7.0) C# projects had same, or better "IntelliSense" support than you have now in Visual Studio 2010 for C. No refactor, comment or almost any other basic coding support feature, you name it — it's not there.
Aug 2, 2011
C/C++ code Documentation XML in Visual Studio
It's amusing how Visual Studio C++ IntelliSense team completely ignores documentation helper functions of text editor, given that C/C++ code is much harder to analyze without comments than managed code. For example you don't get anything on typing /// (three slashes) before function.
Gladly I'm not the only one annoyed with this, so a cool guy named Jason Williams wrote a tool named AtomineerUtils which does just that. Again I note it does this in C/C++ code, not just managed code (in which BTW I satisfied with built-in functionality of Visual Studio.
So here is resume, and don't consider it advertisment. You want nice and clever way to add smart XML comments to your C/C++ code in Visual Studio, then AtomineerUtils is what you want. I must add that while this tool is not free, it's price — $10 is more then reasonable for that you get with it.
Gladly I'm not the only one annoyed with this, so a cool guy named Jason Williams wrote a tool named AtomineerUtils which does just that. Again I note it does this in C/C++ code, not just managed code (in which BTW I satisfied with built-in functionality of Visual Studio.
So here is resume, and don't consider it advertisment. You want nice and clever way to add smart XML comments to your C/C++ code in Visual Studio, then AtomineerUtils is what you want. I must add that while this tool is not free, it's price — $10 is more then reasonable for that you get with it.
Subscribe to:
Posts (Atom)