[Webtest] xml editor suggestions?

Matthew Fleming webtest@lists.canoo.com
Fri, 20 Jun 2003 13:30:04 -0500


This is a multi-part message in MIME format.

------=_NextPart_000_1b9b_5d46_2df2
Content-Type: text/plain; format=flowed

Okay.. why don't we do this.  Here is the dtd we use for our functional 
tests.  It is a pretty good start to a standardized dtd for webtest.  
Someone please make this a part of Canoo.. I believe it has been requested 
for quite some time. You should be able to use any xml editor that supports 
auto completion based upon a dtd.. actually if someone were to comment these 
elements some editors even display them as well.  We use WSAD and this dtd 
works like a champ.

-Matt


----Original Message Follows----
From: "Bill Milbratz Bmilbratz-at-participate.com |Canoo WebTest|" 
<cg9zhgffa10t@sneakemail.com>
Reply-To: "webtest-at-lists.canoo.com |Canoo WebTest|" 
<7h1rh5vwwf0t@sneakemail.com>
To: "'webtest@lists.canoo.com'" <XXXXXXXXXXXXXXXXXXXXXXXXXXX>
Subject: [Webtest] xml editor suggestions?
Date: Fri, 20 Jun 2003 09:45:12 -0500

Hi folks/volks:

Does anyone recommend a fine xml editor for editing webtests? The webtest
documentation strongly recommends an intelligent editor.

I'm using intellij's idea and emacs. The problem is when editing individual
teststeps (i.e. later included as entities), since the file doesn't have a
dtd and isn't valid xml, the 'auto complete' features of the editor don't
work.

any recommendations?  any emacs modes people like for webtest xml editing?

e.g. editing a file that only has this in it:

<invoke  stepid="Contact Us "
   url="/feedback/contactus.jsp" />

  <verifytitle stepid="Contact Us"
     text="${contactus.ok.title}"
     regex="true" />

  <setinputfield
    stepid="Set Contact Us Input"
    name="comment"
    value="Great Site!!! (Contacted via Automatic Testing)" />

  <clickbutton stepid="Click Contact us"
      name="submit"  />

  <verifytitle stepid="Contact Us Verify Title after contacting"
     text="${contactus.after.ok.title}"
     regex="true" />

thanks,

bill milbratz

_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*.  
http://join.msn.com/?page=features/featuredemail

------=_NextPart_000_1b9b_5d46_2df2
Content-Type: text/xml; name="functional_test.dtd"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="functional_test.dtd"

<?xml version="1.0" encoding="ISO-8859-1"?>

<!--
	Elements for the functional Testing
 -->

<!-- Main ant task and configuration-->
<!ELEMENT httpTest (config,steps)>
<!ATTLIST httpTest name CDATA #REQUIRED>

<!ELEMENT config EMPTY>
<!ATTLIST config 
	host CDATA #REQUIRED
	port CDATA #REQUIRED
	protocol CDATA #REQUIRED
	basepath CDATA #REQUIRED
	summary CDATA #IMPLIED
	verbose CDATA #IMPLIED
	saveresponse CDATA #IMPLIED
	resultpath CDATA #IMPLIED
	resultfile CDATA #IMPLIED
	haltonfailure CDATA #IMPLIED
	showhtmlparseroutput CDATA #IMPLIED
	haltonerror CDATA #IMPLIED>

<!ELEMENT steps (
	(verifyxpath)*,
	(setselectfield)*,
	(setcheckbox)*,
	(verifycheckbox)*,
	(clickbutton)*,
	(invoke)*,
	(verifytitle)*,
	(not)*,
	(verifyelement)*,
	(verifytext)*,
	(verifyelementtext)*,
	(verifytextarea)*,
	(clicklink)*,
	(verifylinks)*,
	(verifyxpath)*,
	(verifyinputfield)*,
	(setinputfield)*,
	(verifytitle)*,
	(verifyselectfield)*,
	(previousresponse)*,
    (storeregex)*,
    (storexpath)*,
	(repeat)*,
    (followframe)*
	)+>
<!ATTLIST steps
	stepid CDATA #IMPLIED> 

<!-- verify steps -->
<!ELEMENT verifyelement EMPTY>
<!ATTLIST verifyelement 
	stepid CDATA #IMPLIED
	type CDATA #REQUIRED
	text CDATA #REQUIRED
	regex CDATA #IMPLIED>

<!ELEMENT verifytitle EMPTY>
<!ATTLIST verifytitle 
	stepid CDATA #IMPLIED
	text CDATA #REQUIRED
	regex CDATA #IMPLIED>

<!ELEMENT verifyelementtext EMPTY>
<!ATTLIST verifyelementtext 
	stepid CDATA #IMPLIED
	type CDATA #REQUIRED
	text CDATA #REQUIRED
	regex CDATA #IMPLIED
	name CDATA #IMPLIED>

<!ELEMENT verifytextarea EMPTY>
<!ATTLIST verifytextarea 
	stepid CDATA #IMPLIED
	text CDATA #REQUIRED
	name CDATA #IMPLIED
	regex CDATA #IMPLIED>

<!ELEMENT verifyselectfield EMPTY>
<!ATTLIST verifyselectfield 
	stepid CDATA #IMPLIED
	name CDATA #REQUIRED
	value CDATA #IMPLIED
	text CDATA #IMPLIED
	formname CDATA #IMPLIED
	regex CDATA #IMPLIED>

<!ELEMENT verifytext (table)?>
<!ATTLIST verifytext 
	stepid CDATA #IMPLIED
	text CDATA #REQUIRED
	regex CDATA #IMPLIED>

<!ELEMENT verifylinks EMPTY>
<!ATTLIST verifylinks
	stepid CDATA #IMPLIED
	onsiteonly CDATA #IMPLIED
	depth CDATA #IMPLIED>
        
<!ELEMENT verifyxpath EMPTY>
<!ATTLIST verifyxpath
	stepid CDATA #IMPLIED
    xpath CDATA #REQUIRED
    text CDATA #IMPLIED
    regex CDATA #IMPLIED>

<!ELEMENT verifyinputfield EMPTY>
<!ATTLIST verifyinputfield
	stepid CDATA #IMPLIED
	name CDATA #REQUIRED
	value CDATA #REQUIRED
	formname CDATA #IMPLIED
	regex CDATA #IMPLIED>

<!ELEMENT verifycheckbox EMPTY>
<!ATTLIST verifycheckbox
	stepid CDATA #IMPLIED
	name CDATA #REQUIRED
	checked CDATA #IMPLIED
	value CDATA #IMPLIED>


<!-- set value steps -->

<!ELEMENT setinputfield EMPTY>
<!ATTLIST setinputfield 
	stepid CDATA #IMPLIED
	name CDATA #REQUIRED
	value CDATA #IMPLIED>

<!ELEMENT setcheckbox EMPTY>
<!ATTLIST setcheckbox
	stepid CDATA #IMPLIED
	name CDATA #REQUIRED
	checked CDATA #IMPLIED
	value CDATA #IMPLIED>

<!ELEMENT setselectfield EMPTY>
<!ATTLIST setselectfield
	stepid CDATA #IMPLIED
	name CDATA #REQUIRED
	value CDATA #IMPLIED
	text CDATA #IMPLIED
    multiselect CDATA #IMPLIED
	regex CDATA #IMPLIED>

<!-- locator elements -->
<!ELEMENT form EMPTY>
<!ATTLIST form name CDATA #REQUIRED>

<!ELEMENT index EMPTY>
<!ATTLIST index value CDATA #REQUIRED>

<!-- httpTest: row and column are required, id is implied -->
<!-- dbunit: name is required -->
<!ELEMENT table EMPTY>
<!ATTLIST table 
		  row CDATA #IMPLIED		
		  column CDATA #IMPLIED		
		  id CDATA #IMPLIED			
		  name CDATA #IMPLIED>			

<!-- actions -->
<!ELEMENT previousresponse EMPTY>
<!ATTLIST previousresponse stepid CDATA #IMPLIED>

<!ELEMENT storeregex EMPTY>
<!ATTLIST storeregex
	stepid CDATA #IMPLIED
	text CDATA #REQUIRED
	property CDATA #REQUIRED
	group CDATA #IMPLIED>

<!ELEMENT storexpath EMPTY>
<!ATTLIST storexpath
	stepid CDATA #IMPLIED
	xpath CDATA #REQUIRED
	property CDATA #IMPLIED>

<!ELEMENT followframe EMPTY>
<!ATTLIST followframe
	name CDATA #REQUIRED
	save CDATA #IMPLIED>

<!ELEMENT clicklink EMPTY>
<!ATTLIST clicklink 
	stepid CDATA #IMPLIED
	label CDATA #REQUIRED
	href CDATA #IMPLIED
	save CDATA #IMPLIED>

<!ELEMENT invoke EMPTY>
<!ATTLIST invoke 
	stepid CDATA #IMPLIED
	url CDATA #REQUIRED
	username CDATA #IMPLIED
	password CDATA #IMPLIED
	save CDATA #IMPLIED>

<!ELEMENT clickbutton ((form)?,(index)?)*>
<!ATTLIST clickbutton 
	stepid CDATA #IMPLIED
	label CDATA #IMPLIED
	name CDATA #IMPLIED
	save CDATA #IMPLIED
    x CDATA #IMPLIED
    y CDATA #IMPLIED>

<!ELEMENT not (
	(verifyxpath)*,
	(setselectfield)*,
	(setcheckbox)*,
	(verifycheckbox)*,
	(clickbutton)*,
	(invoke)*,
	(verifytitle)*,
	(not)*,
	(verifyelement)*,
	(verifytext)*,
	(verifyelementtext)*,
	(verifytextarea)*,
	(clicklink)*,
	(verifylinks)*,
	(verifyinputfield)*,
	(setinputfield)*,
	(verifytitle)*,
	(verifyselectfield)*,
	(previousresponse)*,
    (storeregex)*,
    (storexpath)*,
	(repeat)*
	)+>
<!ATTLIST not stepid CDATA #IMPLIED>

<!ELEMENT repeat (
	(verifyxpath)*,
	(setselectfield)*,
	(setcheckbox)*,
	(verifycheckbox)*,
	(clickbutton)*,
	(invoke)*,
	(verifytitle)*,
	(not)*,
	(verifyelement)*,
	(verifytext)*,
	(verifyelementtext)*,
	(verifytextarea)*,
	(clicklink)*,
	(verifylinks)*,
	(verifyinputfield)*,
	(setinputfield)*,
	(verifytitle)*,
	(verifyselectfield)*,
	(previousresponse)*,
    (storeregex)*,
    (storexpath)*,
	(repeat)*
	)+>
<!ATTLIST repeat 
	count CDATA #REQUIRED
	stepid CDATA #IMPLIED
	countername CDATA #IMPLIED>




<!--
	ANT elements
-->
<!ELEMENT project ((target)*,(property)*,(taskdef)*)*>
<!ATTLIST project 
	name CDATA #REQUIRED
	default CDATA #REQUIRED
	basedir CDATA #IMPLIED>

<!ELEMENT target (
	(delete)*,
	(httpTest)*,
	(property)*,
	(httpTest)*,
	(echo)*,
	(copy)*,
	(move)*,
	(tstamp)*,
	(ant)*,
	(junit)*,
	(style)*,
	(antcall)*,
	(exec)*,
	(generateAffiliateKey)*,
	(dbunit)*
	)+>
<!ATTLIST target 
	name CDATA #REQUIRED
	depends CDATA #IMPLIED
	description CDATA #IMPLIED>

<!ELEMENT taskdef (classpath)>
<!ATTLIST taskdef 
	name CDATA #REQUIRED
	classname CDATA #REQUIRED>

<!ELEMENT echo EMPTY>
<!ATTLIST echo message CDATA #REQUIRED>

<!ELEMENT copy EMPTY>
<!ATTLIST copy 
	file CDATA #REQUIRED
	todir CDATA #REQUIRED>

<!ELEMENT move EMPTY>
<!ATTLIST move 
	file CDATA #REQUIRED
	todir CDATA #REQUIRED>

<!ELEMENT format EMPTY>
<!ATTLIST format 
	property CDATA #REQUIRED
	pattern CDATA #REQUIRED>

<!ELEMENT tstamp (format)>
<!ELEMENT property EMPTY>
<!ATTLIST property 
	name CDATA #IMPLIED
	value CDATA #IMPLIED
	file CDATA #IMPLIED>

<!ELEMENT ant (property)*>
<!ATTLIST ant 
	antfile CDATA #IMPLIED
	target CDATA #IMPLIED
	dir CDATA #IMPLIED
	output CDATA #IMPLIED>

<!ELEMENT antcall (param)*>
<!ATTLIST antcall
	target CDATA #REQUIRED>

<!ELEMENT pathelement EMPTY>
<!ATTLIST pathelement 
	location CDATA #IMPLIED
	path CDATA #IMPLIED>

<!ELEMENT fileset EMPTY>
<!ATTLIST fileset 
	dir CDATA #REQUIRED
	includes CDATA #IMPLIED
	excludes CDATA #IMPLIED
	defaultexcludes CDATA #IMPLIED
	includesfile CDATA #IMPLIED
	excludesfile CDATA #IMPLIED>

<!ELEMENT classpath ((pathelement)*,(fileset)*)>
<!ELEMENT test EMPTY>
<!ATTLIST test 
	name CDATA #REQUIRED
	fork CDATA #IMPLIED
	haltonerror CDATA #IMPLIED
	haltonfailure CDATA #IMPLIED
	todir CDATA #IMPLIED
	outfile CDATA #IMPLIED
	if CDATA #IMPLIED
	unless CDATA #IMPLIED>

<!ELEMENT junit ((test)*,(classpath)*)+>
<!ATTLIST junit 
	printsummary CDATA #IMPLIED
	fork CDATA #IMPLIED
	haltonerror CDATA #IMPLIED
	haltonfailure CDATA #IMPLIED
	timeout CDATA #IMPLIED
	maxmemory CDATA #IMPLIED
	jvm CDATA #IMPLIED
	dir CDATA #IMPLIED>

<!ELEMENT delete (fileset)?>
<!ATTLIST delete 
	file CDATA #IMPLIED
	dir CDATA #IMPLIED
	verbose CDATA #IMPLIED
	quiet CDATA #IMPLIED
	includeEmptyDirs CDATA #IMPLIED
	includes CDATA #IMPLIED
	includesfile CDATA #IMPLIED
	excludes CDATA #IMPLIED
	excludesfile CDATA #IMPLIED
	defaultexcludes CDATA #IMPLIED>

<!ELEMENT style ((param)*,(classpath)*)>
<!ATTLIST style 
	in CDATA #REQUIRED
	out CDATA #REQUIRED
	processor CDATA #REQUIRED
	style CDATA #REQUIRED>

<!ELEMENT param EMPTY>
<!ATTLIST param 
	name CDATA #REQUIRED
	value CDATA #IMPLIED
    expression CDATA #IMPLIED>
    
<!ELEMENT exec (arg)*>
<!ATTLIST exec
          command CDATA #IMPLIED
          dir     CDATA #IMPLIED
          os      CDATA #IMPLIED
          output  CDATA #IMPLIED
          executable CDATA #IMPLIED>
          
<!ELEMENT arg EMPTY>
<!ATTLIST arg
	line CDATA #IMPLIED>

<!ELEMENT generateAffiliateKey EMPTY>
<!ATTLIST generateAffiliateKey
	offset CDATA #REQUIRED
	property CDATA #REQUIRED
	tokenKey CDATA #REQUIRED>
	
<!ELEMENT dbunit (classpath*, (operation|export)+)>
<!ATTLIST dbunit 
	driver CDATA #REQUIRED
	url CDATA #REQUIRED
	userid CDATA #REQUIRED
	password CDATA #REQUIRED
	schema CDATA #IMPLIED
	classpath CDATA #IMPLIED
	useQualifiedTableNames CDATA #IMPLIED
	supportBatchStatement CDATA #IMPLIED>
		
<!ELEMENT operation EMPTY>
<!ATTLIST operation
	type CDATA #REQUIRED
	src CDATA #REQUIRED
	format CDATA #IMPLIED>

<!ELEMENT export (table*, query*)>
<!ATTLIST export
	dest CDATA #REQUIRED
	format CDATA #IMPLIED>

<!ELEMENT query EMPTY>
<!ATTLIST query
 	name CDATA #REQUIRED
 	sql CDATA #REQUIRED>


------=_NextPart_000_1b9b_5d46_2df2--