Difference between revisions of "Eweasel Integration"

m (Main ideas and main classes)
m (Main ideas and main classes)
Line 8: Line 8:
 
The main idea is using normal Eiffel classes to replace orignal Eweasel testing control/catalog files. It means, in 6.3, we will write Eweasel testing control/catalog files in normal Eiffel classes instead of writting the eweasel instructions in plain text files.
 
The main idea is using normal Eiffel classes to replace orignal Eweasel testing control/catalog files. It means, in 6.3, we will write Eweasel testing control/catalog files in normal Eiffel classes instead of writting the eweasel instructions in plain text files.
  
First, what testing control file looks like in 6.3:
+
=== First, what testing control file looks like in 6.3 ===
  
 
<eiffel>
 
<eiffel>
Line 60: Line 60:
 
     compile_melted
 
     compile_melted
 
     execute_work
 
     execute_work
 +
 +
=== Second, what's test catalog file looks like in 6.3 ===
 +
 +
<eiffel>
 +
class
 +
EWEASEL_TEST_CATALOG_SAMPLE
 +
 +
inherit
 +
EW_TEST_CATALOG_INSTRUCTIONS
 +
 +
create
 +
make
 +
 +
feature -- Command
 +
 +
execute is
 +
-- The functionality similiar to orignal {TEST_CATALOG_FILE}.parse_line
 +
do
 +
source_path ("C:\eweasel\tests")
 +
 +
test ("array-is-equal", "array001", "tcf pass array", create {EWEASEL_TEST_CONTROL_SAMPLE}.make)
 +
test ("array-is-equal", "array001", "tcf pass array", create {EWEASEL_TEST_CONTROL_SAMPLE}.make)
 +
 +
end
 +
 +
end
 +
 +
</eiffel>
  
 
== Testing control file converter ==
 
== Testing control file converter ==

Revision as of 23:13, 11 September 2008

Warning.png Warning: This page is under development.

This page describes how eweasel integrated in Eiffel Studio 6.3

Main ideas and main classes

The main idea is using normal Eiffel classes to replace orignal Eweasel testing control/catalog files. It means, in 6.3, we will write Eweasel testing control/catalog files in normal Eiffel classes instead of writting the eweasel instructions in plain text files.

First, what testing control file looks like in 6.3

class
	EWEASEL_TEST_CONTROL_SAMPLE
 
inherit
	EW_TEST_CONTROL_INSTRUCTIONS
		redefine
			make
		end
 
create
	make
 
feature {NONE} -- Initialization
 
	make is
			-- Creation method
		do
			Precursor {EW_TEST_CONTROL_INSTRUCTIONS}
			test_name ("Your test name here")
			test_description ("Your test description here")
 
			copy_sub ("Ace", "$TEST", "Ace")
			copy_raw ("test.e", "$CLUSTER", "test.e")
 
			compile_melted
 
			execute_work ("NONE", "NONE", Void)
		end
 
end

In above example, we use:

   test_name ("Your test name here")
   test_description ("Your test description here")
   copy_sub ("Ace", "$TEST", "Ace")
   copy_raw ("test.e", "$CLUSTER", "test.e")
   compile_melted
   execute_work ("NONE", "NONE", Void)

to replace the old testing instructions which are written in normal plain text file:

   test_name Your test name here
   test_description Your test description here
   copy_sub Ace $TEST Ace
   copy_raw test.e $CLUSTER test.e
   compile_melted
   execute_work

Second, what's test catalog file looks like in 6.3

class
	EWEASEL_TEST_CATALOG_SAMPLE
 
inherit
	EW_TEST_CATALOG_INSTRUCTIONS
 
create
	make
 
feature -- Command
 
	execute is
			-- The functionality similiar to orignal {TEST_CATALOG_FILE}.parse_line
		do
			source_path ("C:\eweasel\tests")
 
			test ("array-is-equal", "array001", "tcf pass array", create {EWEASEL_TEST_CONTROL_SAMPLE}.make)
			test ("array-is-equal", "array001", "tcf pass array", create {EWEASEL_TEST_CONTROL_SAMPLE}.make)
 
		end
 
end

Testing control file converter