Newbie need help to get start
-
lundi 7 décembre 2009 19:14Hi all,
I've spent few days to read all documents, blog, and forum; however I'm still unable to get start.... missing alot of info. Currently, I've just developed a simple winform application and would like to use this winform application to evaluation Spec Explorer. Is there anybody out there write blog or tutorial with step by step implement and design Spec Explore from A-Z?
Best Regards,
Toutes les réponses
-
mardi 8 décembre 2009 16:34
Hi Andy:
To use a testing tool in general you have to have something to test which you have done. You can use Spec Explorer’s built-in feature to give step by step guidance on modeling:
Spec Explorer menu -> Modeling Guidance
Please note these are simply instructions, and the general usage of Spec Explorer is equally applicable to both of these scenarios."Author a model from scratch" gives step by step instructions for creating a model before the implementation to be tested exists and optionally how then to include the target system under test for testing. This is good for when the expected behavior of the system is known but the system under test, or the test oriented interface to the system under test (aka “test adapater”), is not yet available.
"Test existing implementation" provides the steps to build a model making use of a system (or test oriented interface) that already exists, and to run the tests.
To get started learning about Spec Explorer you can also make use of the very simple built-in examples created by the Spec Explorer Wizard, and the more complex examples provided that illustrate various features of the tool:
1. Examine the simple example that the Spec Explorer Wizard creates every time. You can start by creating a static modeling solution with the Spec Explorer Modeling wizard. It will create a simple but complete application that you can use to experiement:
New -> Project -> Project Type (panel) -> Test -> Spec Exploref Base Solution -> Spec Explorer Base Solution Wizard (popup) -> Next -> Static Modeling Solution (radio button) -> Finish.
It will create a new solution with name SpecExplorenn, e.g. SpecExplorer02.Look in Model.cs and Config.cord to see how the model works. Look in Implementation.cs to see that the system under test has a simple bug (intentionally)! On the VS command menu you will find Spec Explorer. Under that drop down you will find the all critical Exploration Manager and other important Spec Explorer commands. From the Exploration Manager you can explore, and generate test code which you then run in the standard VS manner. When everything runs, try fixing the very simple bug and go through the cycle again!
2. Click on any of the fuller examples found from the Samples page reached via:
Windows Start menu -> All Programs -> Spec Explorer 2010 -> Samples for Visual Studio 20xx (pick your version).
This will give you six sample of various complexity with which to examine and play.
You may also want to keep an eye out for a planned update to the Getting Started section of the documentation. Your feedback and patience is appreciated. -
mercredi 9 décembre 2009 17:47Thanks for your responded Rob; however, I still don't know how to link spec explorer to my requirement and winform application. Do I have to create new spec explorer project within my solution which contain all forms and classes for my winform application? In additional, when I click generate testcase, how do I know it generates against my winform application? ....
Best Regards, -
jeudi 10 décembre 2009 02:22Modérateur
Following the "Test existing implementation" modeling guidance should answer your question. You establish the relationship between model and implementation in the first activity (Import actions from implementation).
Notice that Spec-Explorer-generated test cases will call .Net methods in your implementation. So you will need your system under test to provide the automation to control it from code. These can be either methods exposed directly by your application or they can be provided in an adapter (see my post about this topic on the Spec Explorer Team Blog).
Spec Explorer will not create UI automation for you. It will generate test cases that drive it.- Proposé comme réponse Nico KicillofMicrosoft Employee, Moderator vendredi 11 décembre 2009 20:31
- Marqué comme réponse Nico KicillofMicrosoft Employee, Moderator vendredi 18 décembre 2009 22:43
-
lundi 17 mai 2010 22:27
Hi,
I too have some question related to this. Can you please clarify me,
I dont have the Implementation code with me, Am just writting some models to generate the testcase for the manual testers in readable format.
1. I have a adaptor code which is used to write or generate the testcase to other formats like .txt or .xls. How can i interlink the Model and the adaptor code?
2. Do i need to write the Model first or Adaptor first?
3. Do i need to call the adaptor functions from the Model to write the testcase in .txt file or the interlink itself will do that?
Please clarify me these things.
Thanks in advance
-
mardi 18 mai 2010 15:43
Hi Rajesh:
1. This is not the usual way to use spec explorer. Spec Explorer is set up to generate code that is run through a test harness. Your implementation methods will have to decide how to translate all the details of testing into something "executable" by humans. You can not link adaptor code directly to the model, but rather only to the generated test code. So your generated "test case" will actually wind up being code geneators that in turn create their own notion of test cases! Spec Explorer will not be able to test anything because you are not direcly interacting with the System Under Test in the SE generated code, rather your test instruction are doing that down stream.
2. Genernally you define the actions first. With that settled, the model and the implementation can proceed in parallel. For one person I would think starting on the model usually makes most sense.
3. Not sure what the Interlink tool does, but as noted it is an unusual way to use Spec Explorer. I have seen attempts to use the Spec Explorer test cases to themselves generate other test cases, but it is generally not recommended.
Thanks,
Rob
-
mardi 25 mai 2010 23:59Modérateur
If you already have an adapter, you can just declare the adapter methods as actions in a Cord config. You don't invoke adapter methods from the model. The tests generated from your model will call your adapter methods. When you run the tests, your adapter methods will be called, and the .txt or .xls will be generated.
- Proposé comme réponse Nico KicillofMicrosoft Employee, Moderator mardi 25 mai 2010 23:59
-
mercredi 15 février 2012 09:28
hi Nico Sir,
Iam Ashok.Currently iam doing Internship in Tcs and i am doing research work on Spec Explorer test case generation using UML sequence diagrams.I have one basic doubt that I have seen ATM sample program containing .adapter,.model and mockup projects.
Now I have created one sequential model and now i want to generate test case for that but i created a new model using spec explorer static model wizard and that gives me an dummy projects like Add And Reset functionality.Then how can i generate code for the new model which i had generated previously and iam not getting that how to relate that adapter,mockup projects to model (uml sequencial ).So i had seen all ur videos which inspired me to research me more.
So could you please do answer to following Questions then iam very greatful to u .
1.how to generate code for the cord file and model program according to the uml model to which i have generated?
2.how to relate that ATM model to the projects like cord ,model to the uml model?
So.its my humble request to you to answer to this either by email or to post to this reply.
If you dont mind I will be very glad if u send it to me to my mailid
and my mailid is
So plz do keep me reply as early as possible...Thank you sir.
-
mercredi 15 février 2012 18:17Modérateur
Hi Ashok,
The UML extension is an experimental feature. I wouldn't use it as a starting point. My recommendation if you've never used Spec Explorer is to first create models using fully supported features, for example following the modeling guidance or the classes available online. Once you feel you can use the tool and understand the conepts behind it, you can move on to experimental features.
Best,
Nico
-
jeudi 16 février 2012 08:30
Hi Nico Sir,
Thanks for your reply and valuable suggestions and i will definitely do that.Now I am trying to learn that in addition to that in the perspective of UML based test case generation using spec explorer.I have a small doubt that
Are we manually need to write code for actions and machines declarations in cord file and model,adapters projects or is there any procedure to do that automatically generate code for adapters projects ,mockup projects etc?
If it is there please do inform me how to generate it depending on UML and i am interested in that because my project is completely related to non technical company guys.
So if you have any suggestions or any references please do post me
Thanks & Regards
Ashok
-
vendredi 17 février 2012 01:39Modérateur
Are we manually need to write code for actions and machines declarations in cord file and model,adapters projects or is there any procedure to do that automatically generate code for adapters projects ,mockup projects etc?
No. Spec Explorer provides modeling guidance and assisted procedures that help you generate skeletons for some of these files from the others. They are under the Spec Explorer menu in Visual Studio. None of these are based on UML. In Spec Explorer model authoring is textual. You can the UML experimental feature as a complement.
-
vendredi 17 février 2012 04:22
Thanks a lot Nico ,now i got the clear idea of the usage of spec explorer.
Can u please suggest me how uml extension for spec explorer .I have downloaded and watched all ur spec explorer videos which uses cord script for model design.
So is there any tutorials or videos regarding uml extension for spec explorer and their usage?
If u have any videos or suggested sites please suggest me ....because i have gone through many blogs and forums but i didnt find any videos or tutorials regarding UML addition of spec explorer.
Because as I have seen ur spec explorer videos in channel9 and other sites it has given me entire idea about spec explorer basics,
I am thankful for that
If u suggest any sites for uml also then i wiil be more helpful to me..please
Regards
Ashok
- Modifié AshokNaina vendredi 17 février 2012 11:47
-
samedi 18 février 2012 17:21
hi Nico Sir .This is Ashok
please send me answer to yesterday post .I need ur help Sir please
Regards
Ashok
-
samedi 18 février 2012 17:55Modérateur
Hi Ashok,
There's no help for the UML extension. You would have to follow the samples.
Best,
Nico
-
dimanche 19 février 2012 15:53
Hi Nico
Thanks a lot for up to ur response i will definitely try to work out on that....
Regarda
Ashok
-
mercredi 14 mars 2012 07:19
Hi Nico Sir,
This is Ashok..
Now i got confidence to work with spec explorer for a general static model as you shown in your videos and i want to really thankful for that.
Now the thing is , I started up to the UML extension as it was additional thing to spec explorer and it reduces the lot of coding work and maintains business rules in the form of sequence diagrams
So, i walkthroughed through the ATM sample as it was in the uml samples.
My doubt is that
" Is the ATM transaction details and account verification etc ,, all things are really going to create and store in the database or simply it is just assuming to be there and have a high level of almost 10-20% of creating and updating the transactions because as we have a model , we can change our requirements as we needed so therefore what i think was it is only the high level of margin and in your video as you said that spec explorer is a light weight framework..."
In Simply, i want to know "whether we are going to create and update any database for ATM or simple we are maintaining the high level of assumption"..
Please do clarify me Sir....or any suggestions to fulfill my approach .
Waiting for ur valuable reply...
Thanks
Ashok

