Crazy Developer

...feel free to become an authority

Welcome to my technical blog. Hope the information enclosed will help you to improve the abilities and resolve the IT issues.
The most popular categories are BlogEngine.NET related info, downloads.
Also, you may be interested by my CV and thesis. Look for more info at About.

Whenever I'm asking a Quality Assurance Engineer "What is the best tool you dreamed?", I'm hearing the same answer:

That tool has to analyze itself the executables …deeply and thorougly all exisiting aspects and combinations …found the bugs and generate some reports for me …oops! I need the control – an easy scenario language, preferable UI-driven.

 

So I have been trying during my free time to write at least the base for such an instrument. It is BHR. Download it here tar-gzipped (~11MB).

BHR So, what is the idea?

 

 

1. It is working both on Linux and Sun Solaris.

2. Using scenario XML files or command line you can target any executable(s) or library(ies), which was compiled sometimes by gcc and cc compilers. This set can be extended quite easily.

3. Using the ffcall library, BHR is extracting all the symbols from the executable (at least all the functions and not only).

4. If it is a C++ library, symbols are demangled and specific tips applied (for virtual functions or constructors, for instance).

5. Scenarios are executed step by step and results are compared with the required ones. Alternatively, all the combinations of possible scenarios are generated randomly and executed (some kind of stress-testing). An example of scenario used internally against my testing library:

  <?xml version="1.0" encoding="ascii" ?>
- <!--
<!DOCTYPE scenario [
<!ELEMENT scenario    (library,directive,execute,comment)>
<!ELEMENT library     (#PCDATA)>
<!ELEMENT directive   (#PCDATA)>
<!ATTLIST directive type CDATA #IMPLIED parameters CDATA #IMPLIED>
<!ELEMENT method (#PCDATA)>
<!ELEMENT comment (#PCDATA)>
]>
  -->
- <scenario>
  <library path="../lib/libbhr_test.so" />
  <comment>show reflection rezult:</comment>
  <directive type="print" parameters="cache">Demangled symbols:</directive>
  <comment>method 1st function:</comment>
  <comment>C function</comment>
- <synonyms value="unsigned int">
  <synonym value="unsigned" />
  </synonyms>
- <method>
  <argument value="abcd" />
  <result name="str1" type="char*" />
- <execute>
<![CDATA[
vh::get_string(char*)
  ]]>
  </execute>
  </method>
- <!--
    <method>
      <argument value="abcd"/>
      <argument value="2"/>
      <argument value="efgh"/>
      <result name="my_int1" type="int"/>
      <execute>
        <![CDATA[vh::nnn(std::string, int, std::string)]]>
      </execute>
    </method>
    
  -->
- <method>
  <argument value="690690" />
  <result name="res1" type="void*" />
- <execute>
<![CDATA[
ml_get(long)
  ]]>
  </execute>
  </method>
- <method>
  <result name="res2" type="long" />
- <execute>
<![CDATA[
stub_plong
  ]]>
  </execute>
  </method>
- <method>
  <argument name="res1" />
  <result type="void" />
- <execute>
<![CDATA[
ml_set(void*)
  ]]>
  </execute>
  </method>
- <method>
  <argument value="12345" />
  <result name="llong1" type="long&" />
- <execute>
<![CDATA[
ml_get(long&)
  ]]>
  </execute>
  </method>
- <method>
  <argument value="abcde" />
  <result type="void" />
- <execute>
<![CDATA[
TestOne::string_static(char*)
  ]]>
  </execute>
  </method>
- <method>
  <result name="StructOne1" type="StructOne" />
- <execute>
<![CDATA[
vh::GetStructOne()
  ]]>
  </execute>
  </method>
- <method>
  <argument name="StructOne1" />
  <result type="void" />
- <execute>
<![CDATA[
SetStructOne(StructOne)
  ]]>
  </execute>
  </method>
- <method type="constructor">
  <result name="object1" />
  <execute>TestOne::TestOne()</execute>
  </method>
- <method object="object1">
  <argument value="O" />
  <result type="void" />
- <execute>
<![CDATA[
TestOne::mc_one(char)
  ]]>
  </execute>
  </method>
- <method object="object1">
  <argument value="T" />
  <result name="char1" type="char" />
- <execute>
<![CDATA[
TestOne::mc_two(char)
  ]]>
  </execute>
  </method>
- <method object="object1">
  <argument value="B" />
  <result name="cchar1" type="char" />
- <execute onlyForEngine="SunOS">
<![CDATA[
TestOne::mc_three(const char)const
  ]]>
  </execute>
- <execute onlyForEngine="Linux">
<![CDATA[
TestOne::mc_three(char) const
  ]]>
  </execute>
  </method>
- <method object="object1">
  <argument value="A" />
  <result name="char_1" type="char" />
- <execute>
<![CDATA[
TestOne::mc_four(char&)
  ]]>
  </execute>
  </method>
- <method object="object1">
  <argument value="U" />
  <result type="void" />
- <execute>
<![CDATA[
TestOne::msc_one(signed char)
  ]]>
  </execute>
  </method>
- <method object="object1">
  <argument value="S" />
  <result name="charS" type="signed char" />
- <execute>
<![CDATA[
TestOne::msc_two(signed char)
  ]]>
  </execute>
  </method>
- <method object="object1">
  <argument value="R" />
  <result type="void" />
- <execute>
<![CDATA[
TestOne::muc_one(unsigned char)
  ]]>
  </execute>
  </method>
- <method object="object1">
  <argument value="H" />
  <result name="charH" type="unsigned char" />
- <execute>
<![CDATA[
TestOne::muc_two(unsigned char)
  ]]>
  </execute>
  </method>
- <method object="object1">
  <argument value="abcde" />
  <result type="void" />
- <execute onlyForEngine="SunOS">
<![CDATA[
TestOne::mcs_one(const char*)
  ]]>
  </execute>
- <execute onlyForEngine="Linux">
<![CDATA[
TestOne::mcs_one(char const*)
  ]]>
  </execute>
  </method>
- <method object="object1">
  <argument value="abcde" />
  <result type="const char*" onlyForEngine="SunOS" />
- <execute onlyForEngine="SunOS">
<![CDATA[
TestOne::mcs_two(const char*)
  ]]>
  </execute>
  <result type="char const*" onlyForEngine="Linux" />
- <execute onlyForEngine="Linux">
<![CDATA[
TestOne::mcs_two(char const*)
  ]]>
  </execute>
  </method>
- <method object="object1">
  <argument value="432" />
  <result type="void" />
- <execute>
<![CDATA[
TestOne::mi_one(int)
  ]]>
  </execute>
  </method>
- <method object="object1">
  <argument value="543" />
  <result name="int1" type="int" />
- <execute>
<![CDATA[
TestOne::mi_two(int)
  ]]>
  </execute>
  </method>
- <method object="object1">
  <argument value="1532" />
  <result type="void" />
- <execute>
<![CDATA[
TestOne::mui_one(unsigned int)
  ]]>
  </execute>
  </method>
- <method object="object1">
  <argument value="71545" />
  <result name="uint1" type="unsigned" onlyForEngine="SunOS" />
- <execute onlyForEngine="SunOS">
<![CDATA[
TestOne::mui_two(unsigned int)
  ]]>
  </execute>
  <result name="uint1" type="unsigned int" onlyForEngine="Linux" />
- <execute onlyForEngine="Linux">
<![CDATA[
TestOne::mui_two(unsigned int)
  ]]>
  </execute>
  </method>
- <method object="object1">
  <argument value="120" />
  <result type="void" />
- <execute>
<![CDATA[
TestOne::msh_one(short)
  ]]>
  </execute>
  </method>
- <method object="object1">
  <argument value="143" />
  <result name="short1" type="short" />
- <execute>
<![CDATA[
TestOne::msh_two(short)
  ]]>
  </execute>
  </method>
- <method object="object1">
  <argument value="20" />
  <result type="void" />
- <execute>
<![CDATA[
TestOne::mush_one(unsigned short)
  ]]>
  </execute>
  </method>
- <method object="object1">
  <argument value="43" />
  <result name="ushort1" type="unsigned short" />
- <execute>
<![CDATA[
TestOne::mush_two(unsigned short)
  ]]>
  </execute>
  </method>
- <method object="object1">
  <argument value="43267" />
  <result type="void" />
- <execute>
<![CDATA[
TestOne::ml_one(long)
  ]]>
  </execute>
  </method>
- <method object="object1">
  <argument value="67543" />
  <result name="long2" type="long" />
- <execute>
<![CDATA[
TestOne::ml_two(long)
  ]]>
  </execute>
  </method>
- <method object="object1">
  <argument value="143267" />
  <result type="void" />
- <execute>
<![CDATA[
TestOne::mul_one(unsigned long)
  ]]>
  </execute>
  </method>
- <method object="object1">
  <argument value="267543" />
  <result name="ulong2" type="unsigned long" />
- <execute>
<![CDATA[
TestOne::mul_two(unsigned long)
  ]]>
  </execute>
  </method>
- <method object="object1">
  <argument value="43267" />
  <result type="void" />
- <execute>
<![CDATA[
TestOne::mll_one(long long)
  ]]>
  </execute>
  </method>
- <method object="object1">
  <argument value="67543" />
  <result name="longlong2" type="long long" />
- <execute>
<![CDATA[
TestOne::mll_two(long long)
  ]]>
  </execute>
  </method>
- <method object="object1">
  <argument value="243267" />
  <result type="void" />
- <execute>
<![CDATA[
TestOne::mull_one(unsigned long long)
  ]]>
  </execute>
  </method>
- <method object="object1">
  <argument value="367543" />
  <result name="ulonglong2" type="unsigned long long" />
- <execute>
<![CDATA[
TestOne::mull_two(unsigned long long)
  ]]>
  </execute>
  </method>
- <method object="object1">
  <argument value="156.98" />
  <result type="void" />
- <execute>
<![CDATA[
TestOne::mf_one(float)
  ]]>
  </execute>
  </method>
- <method object="object1">
  <argument value="856.05" />
  <result name="float1" type="float" />
- <execute>
<![CDATA[
TestOne::mf_two(float)
  ]]>
  </execute>
  </method>
- <method object="object1">
  <argument value="156.98" />
  <result type="void" />
- <execute>
<![CDATA[
TestOne::md_one(double)
  ]]>
  </execute>
  </method>
- <method object="object1">
  <argument value="856.05" />
  <result name="double1" type="double" />
- <execute>
<![CDATA[
TestOne::md_two(double)
  ]]>
  </execute>
  </method>
- <!--
	<method object="object1">
		<argument value="8436.989"/>
		<result type="void"/>
		<execute>
			<![CDATA[TestOne::mld_one(long double)]]>
		</execute>
	</method>
	<method object="object1">
		<argument value="678.05"/>
		<result name="double1" type="long double"/>
		<execute>
			<![CDATA[TestOne::mld_two(long double)]]>
		</execute>
	</method>
	
  -->
- <method object="object1">
  <argument value="false" />
  <result type="void" />
- <execute>
<![CDATA[
TestOne::mb_one(bool)
  ]]>
  </execute>
  </method>
- <method object="object1">
  <argument value="true" />
  <result name="bool1" type="bool" />
- <execute>
<![CDATA[
TestOne::mb_two(bool)
  ]]>
  </execute>
  </method>
- <method object="object1">
  <argument value="abcdef" />
  <argument value="ghijkl" />
  <result name="str3" type="char*" />
- <execute>
<![CDATA[
TestOne::get_string(char*, char*)
  ]]>
  </execute>
  </method>
- <method type="destructor" object="object1">
- <execute>
<![CDATA[
TestOne::~TestOne()
  ]]>
  </execute>
  </method>
- <method type="constructor">
  <argument value="aaab" />
  <result name="object2" />
- <execute>
<![CDATA[
TestTwo::TestTwo(char*)
  ]]>
  </execute>
  </method>
- <method object="object2">
  <argument value="K" />
  <result type="void" />
- <execute>
<![CDATA[
TestTwo::mc_one(char)
  ]]>
  </execute>
  </method>
- <method object="object2">
  <argument value="Q" />
  <result name="char3" type="char" />
- <execute>
<![CDATA[
TestTwo::mc_two(char)
  ]]>
  </execute>
  </method>
- <method object="object2">
  <argument value="9480.057" />
  <result name="double2" type="double" />
- <execute>
<![CDATA[
TestOne::md_two(double)
  ]]>
  </execute>
  </method>
  </scenario>
It is clear that generating of such scenario is easily to be wrapped by a custom GUI driven additional tool.

Installation

1. Merge with my .bash_profile (or apply manually the commands inside)
2. If you have no installed ffcall and Xerces 2.7.0 libraries, goto 3rdParty directory and execute the make3rdParty
3. Use aclocal && autoconf && make all commands or use Sun Studio 12 to open the project and rebuild all
4. Test the program:
      bhr [options] <XML file path>

  Options:\n"
        -?              - Show this help and exit.
  ---------executing capabilities---------
        -v=xxx          - Validation scheme [always | never | auto*].
        -n              - Enable namespace processing [default is off].
        -s              - Enable schema processing [default is off].
        -f              - Enable full schema constraint checking [default is off].
        <XML file path> - scenario file including commands to be executed.
  ---------exporting capabilities---------
        -e              - export symbols from the library [library file path]
        <XML file path> - XML file to be fiiled with library symbols [XML file path]
    * = Default if not provided explicitly. Options are non-case sensitive
The program is provided AS IS only for DEMO purposes. No warranties are provided. If someone is interested in developing this project, please let me know.

Add comment


(Will show your Gravatar icon)

  Country flag

biuquote
  • Comment
  • Preview
Loading



Babooo.md 1.5 is the system on top of the site family *.babooo.md, *.babooo.us, *.babooo.ru and *.babooo.eu. It is running on top of MS Windows 2008 tuned up to roles IIS 7.0 and DNS server, SQL Server 2008, Adobe Flash Media Server 3.5 and .Net Framework 3.5.

System components

Mainly it is two major components for now:

1. Crazy Babooo video mail system with video live conferences and chat supporting.

2. Blogs system based on deeply enhanced and customized .Net BlogEngine. You can try Crazy developer Blog, Babooo.md Blog, Personal Alionka blog, Psychology Blog, Sasha Blog, Natasha Blog and so on.

The ongoing development of Babooo.md can be followed at Babooo.md Blog where you can buy the software.

Good luck and enjoy.

The Babooo.md team

Welcome to Babooo.md 1.5

Posted by sirbu