User Manual

How to Query?

FACTS - Feature-Aware Congruency-Test Selection

Domain modeling is supported by a web-based feature editor. For details, show cases and examples, visit http://search.merobase.com/index.html#/showcase.

A domain model consists of two parts –

  1. feature tree
  2. test matrix

Example of Domain Representation in XML (feature_tree element based on SXFM):

<facts>
	<feature_model>
<meta>
</meta>
<feature_tree>
:r Base64 (Base64_0)
	:m  Encode (1_Encode)
		:m  Padding (4_Padding)
		:m  Chunking (7_Chunking)
		:o  URLSafe (10_URLSafe)
</feature_tree>
<constraints>
</constraints>
</feature_model>
<test-matrices>
	<test-matrix>
<test-case>
		<name>
			TC1_Encode
		</name>
		<inputs>
		<input>
			<name>param0</name><value>Hi!</value><type>java.lang.String</type>
		</input>
		</inputs>
		<output>
			<name>retParam</name><value>SGkh</value><type>java.lang.String</type>
		</output>
		</test-case>
<test-case>
		<name>
			TC2_Padding
		</name>
		<inputs>
		<input>
			<name>param0</name><value>Hi</value><type>java.lang.String</type>
		</input>
		</inputs>
		<output>
			<name>retParam</name><value>SGk=</value><type>java.lang.String</type>
		</output>
		</test-case>
<test-case>
		<name>
			TC3_Chunking
		</name>
		<inputs>
		<input>
			<name>param0</name><value>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</value><type>java.lang.String</type>
		</input>
		</inputs>
		<output>
			<name>retParam</name><value>TG9yZW0gaXBzdW0gZG9sb3Igc2l0IGFtZXQsIGNvbnNlY3RldHVyIGFkaXBpc2NpbmcgZWxpdCwg
c2VkIGRvIGVpdXNtb2QgdGVtcG9yIGluY2lkaWR1bnQgdXQgbGFib3JlIGV0IGRvbG9yZSBtYWdu
YSBhbGlxdWEuIFV0IGVuaW0gYWQgbWluaW0gdmVuaWFtLCBxdWlzIG5vc3RydWQgZXhlcmNpdGF0
aW9uIHVsbGFtY28gbGFib3JpcyBuaXNpIHV0IGFsaXF1aXAgZXggZWEgY29tbW9kbyBjb25zZXF1
YXQuIER1aXMgYXV0ZSBpcnVyZSBkb2xvciBpbiByZXByZWhlbmRlcml0IGluIHZvbHVwdGF0ZSB2
ZWxpdCBlc3NlIGNpbGx1bSBkb2xvcmUgZXUgZnVnaWF0IG51bGxhIHBhcmlhdHVyLiBFeGNlcHRl
dXIgc2ludCBvY2NhZWNhdCBjdXBpZGF0YXQgbm9uIHByb2lkZW50LCBzdW50IGluIGN1bHBhIHF1
aSBvZmZpY2lhIGRlc2VydW50IG1vbGxpdCBhbmltIGlkIGVzdCBsYWJvcnVtLg==</value><type>java.lang.String</type>
		</output>
		</test-case>
<test-case>
		<name>
			TC4_URLSafe
		</name>
		<inputs>
		<input>
			<name>param0</name><value>subjects?_d</value><type>java.lang.String</type>
		</input>
		</inputs>
		<output>
			<name>retParam</name><value>c3ViamVjdHM/X2Q=</value><type>java.lang.String</type>
		</output>
		</test-case>
	</test-matrix>
</test-matrices>
</facts>

Classic - Test Specification

Match software components by your test specification (expected input/output mappings). Currently, JUnit4 is supported.

Example Base64 JUnit4 Test:

public class Base64Test {

    @Test
    public void testEncode() {
        Base64 b = new Base64();

        String basicAuth = "Authorization: Basic ";
        String userPassPlain = "user:password";
        byte[] encodeBytes = userPassPlain.getBytes();

        // encode
        String userPassBase64 = b.encode(encodeBytes);

        assertEquals("dXNlcjpwYXNzd29yZA==", userPassBase64);
    }
}

The software component under test may not be fully-qualified (e.g., my.package.Base64).

Currently, JUnit4 is supported. In a textual search, only the signatures of the software component under test are extracted and an interface-driven code search is conducted.

Example Base64 JUnit4 Test:

public class Base64Test {

    @Test
    public void testEncode() {
        Base64 b = new Base64();

        String basicAuth = "Authorization: Basic ";
        String userPassPlain = "user:password";
        byte[] encodeBytes = userPassPlain.getBytes();

        // encode
        String userPassBase64 = b.encode(encodeBytes);

        assertEquals("dXNlcjpwYXNzd29yZA==", userPassBase64);
    }
}

Use an UML-like syntax to match components by similar interface signatures (i.e., Merobase Query Language (MQL)-compliant interface signatures).

Example Base64 JUnit4 Test:

Base64(
  encode(byte[]):String;
)