Pass agument to template UI using Zeus commandline

Is there a feature you'd like us to add? Post it here.

Pass agument to template UI using Zeus commandline

Postby ashish on Wed Oct 18, 2006 12:54 pm

Is there any way to pass some parameters to template UI using command line?
I want to create a test suite that tests my templates. I want to use command line argument to send config file to load by UI (that have all the values to be loaded).

I am really looking to create some Unit test against my complex templates, I want to make sure I am not breaking anything and also want to see how my template behaves in various conditions.

Having such will make sure ppl get templates with really good quality and no bugs.
-------------
Ashish Agrawal
ashish
Lurker
 
Posts: 5
Joined: Tue Oct 18, 2005 12:52 pm

Postby justin.greenwood on Wed Oct 18, 2006 1:45 pm

You can run input through your templates via an xml file. to see what one of them looks like you can click on the \"Record template input\" button in the template browser. It saves a \"zinp\" file. You can also record this input from the command line.
Here is a sample command line call to record input:
Code: Select all
ZeusCmd -t c:\\mytemplate.jgen -c c:\\savedInput.zinp

Here is a sample command line rerun the input:
Code: Select all
ZeusCmd -i c:\\savedInput.zinp

Here is a sample zinp file:
Code: Select all
<?xml version=\"1.0\" encoding=\"utf-8\"?>
<obj name=\"\" uid=\"5a5e4266-2ad0-1af1-b8c5-acd22b3a4342\" path=\"C:\\Program Files\\MyGeneration\\Templates\\PHP\\PHP_BusinessObject.jgen\">
  <items>
    <item name=\"__dbConnectionString\" type=\"System.String\" val=\"Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=Northwind;Data Source=localhost\" />
    <item name=\"__dbDriver\" type=\"System.String\" val=\"SQL\" />
    <item name=\"__dbLanguageMappingFileName\" type=\"System.String\" val=\"C:\\Program Files\\MyGeneration\\Settings\\Languages.xml\" />
    <item name=\"__dbTarget\" type=\"System.String\" val=\"SqlClient\" />
    <item name=\"__dbTargetMappingFileName\" type=\"System.String\" val=\"C:\\Program Files\\MyGeneration\\Settings\\DbTargets.xml\" />
    <item name=\"__defaultOutputPath\" type=\"System.String\" val=\"C:\\Program Files\\MyGeneration\\Settings\" />
    <item name=\"__defaultTemplatePath\" type=\"System.String\" val=\"C:\\Program Files\\MyGeneration\\Templates\\\" />
    <item name=\"__domainOverride\" type=\"System.Boolean\" val=\"True\" />
    <item name=\"__language\" type=\"System.String\" val=\"C#\" />
    <item name=\"__userMetaDataFileName\" type=\"System.String\" val=\"C:\\Program Files\\MyGeneration\\Settings\\UserMetaData.xml\" />
    <item name=\"__version\" type=\"System.String\" val=\"1.1.7.7\" />
    <item name=\"btnPath\" type=\"System.String\" val=\"\" />
    <item name=\"cmbDatabase\" type=\"System.String\" val=\"Northwind\" />
    <item name=\"dbConnectionString\" type=\"System.Boolean\" val=\"True\" />
    <item name=\"dbDriver\" type=\"System.String\" val=\"SQL\" />
    <item name=\"defaultOutputPath\" type=\"System.String\" val=\"C:\\Program Files\\MyGeneration\\Settings\\GeneratedOutput\" />
    <item name=\"defaultTemplatePath\" type=\"System.String\" val=\"C:\\Program Files\\MyGeneration\\Templates\\\" />
    <item name=\"lstTables\" type=\"System.Collections.ArrayList\" val=\"System.String|H|Customers;\" />
    <item name=\"txtPath\" type=\"System.String\" val=\"C:\\Program Files\\MyGeneration\\Settings\" />
  </items>
</obj>
User avatar
justin.greenwood
Site Admin
 
Posts: 441
Joined: Sat Apr 03, 2004 6:10 am
Location: Indianapolis, IN

Thanks

Postby ashish on Fri Nov 03, 2006 6:04 am

Thanks Justin, I also thought to mygen project files to achieve same.
-------------
Ashish Agrawal
ashish
Lurker
 
Posts: 5
Joined: Tue Oct 18, 2005 12:52 pm


Return to Enhancements

Who is online

Users browsing this forum: No registered users and 1 guest

cron