.NET Framework Developer Center >
.NET Development Forums
>
Microsoft SQL Server Modeling
>
Generating Visual studio Test case from Mgraph
Generating Visual studio Test case from Mgraph
- Can anyone please help to point to some resources OR give any idea on how to transfer Mgraph to Visual Studio Automated Tests?We are evaulating for using Oslo for "DSL for functional testing for web applications". what we are trying to do is to come up with our own language in which test cases can be written and we need to transfer them to Test which can be executed from Visual Studio (mstest.exe).For example - below is an sample DSL textScenario "Search Customer that exists"
Given WebPage "http://yahoo.com"
When type "a" in Textbox "txtName"
Assert SomeCondition
End ScenarioWe are able to define our Grammar(mGrammar) and MGrpah from this DSL text, But we "have no idea" how to generate a Test C# Code(or directly a DLL) from this graph. We do not want to write our custom application to run the test generated. We have to generate Code that can be run as test from Visual studio.
Regards
singhhome
Answers
- Hello
It sounds like the scenario that you describe requires generation of source code, a scenario that we do not presently support "out of the box". The recommended approach would be to implement a "runtime" that interprets the driving data (the MGraph that you already generate). Such "interpretation" could entail generation of appropriate C# code or you might want to write a new test host. Either way, I could see us doing a much better job enabling such scenarios in the future, but, unfortunately, today there isn't any such support.
Clemens- Marked As Answer byKraig BrockschmidtMSFT, ModeratorThursday, October 22, 2009 2:58 AM
- Proposed As Answer byKraig BrockschmidtMSFT, ModeratorWednesday, October 14, 2009 3:32 PM
All Replies
- Hello
It sounds like the scenario that you describe requires generation of source code, a scenario that we do not presently support "out of the box". The recommended approach would be to implement a "runtime" that interprets the driving data (the MGraph that you already generate). Such "interpretation" could entail generation of appropriate C# code or you might want to write a new test host. Either way, I could see us doing a much better job enabling such scenarios in the future, but, unfortunately, today there isn't any such support.
Clemens- Marked As Answer byKraig BrockschmidtMSFT, ModeratorThursday, October 22, 2009 2:58 AM
- Proposed As Answer byKraig BrockschmidtMSFT, ModeratorWednesday, October 14, 2009 3:32 PM
- I have created an open source project for helping to solve exactly these types of scenarios: http://metasharp.codeplex.comIt uses MGrammar from project Oslo to do parsing of textual DSLs and gives you some of the missing links to help you transform the parsed graph into executable code. The project is in Alpha stages right now but your DSL does not appear to be too complex. If you would like to give it a try and have any questions feel free to ask me on the MetaSharp forums at CodePlex.


