Giter Site home page Giter Site logo

thiagolvlsantos / specrunner Goto Github PK

View Code? Open in Web Editor NEW
5.0 5.0 0.0 214.97 MB

Acceptance test driven development tool.

Home Page: https://thiagolvlsantos.github.io/specrunner

Java 91.11% CSS 0.64% JavaScript 0.28% HTML 7.84% Batchfile 0.02% Gherkin 0.09% Shell 0.02%
attd integration tdd test

specrunner's People

Contributors

dependabot[bot] avatar thiagolvlsantos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

specrunner's Issues

Add a 'ref-value' to enable an action/assertion use values somewhere else

Example:

<table>
  <tr><td class="type" by="id:startDate" refvalue="//*[@id='common']">fill</td></tr>
  <tr><td id="common" converter="date" arg0='MM/dd/yyyy'>actual date</td></tr>
</table>

The action 'type' must fill the target field 'startDate' using 'refvalue' which 
final content is interpreted as the current date in format 'MM/dd/yyyy'.


Original issue reported on code.google.com by [email protected] on 10 Oct 2013 at 2:47

Update idmanager on 'updates'

Example:
1)maps a value by virtual/reference pair;
2)update the reference value(s) using prepare/verify;
3)verify final database state.

The register updated appears as null, but the old value is in ids mapping.

Create resume report in HTML

Add HTML resume output every execution of tests.

Create two strategies:
1) Infinite log;
2) Circular queue of 20 elements.

Original issue reported on code.google.com by [email protected] on 9 Oct 2013 at 5:20

Allow converters from same type to same type

i.e a converter from user login to user name, both fields are String but I can recover name from login before entering a method.

example:

public void prepareName(@converter(type=ConverterLoginToName.class) String name) {
// expected to receive 'John Smith'
}

HTML:

prepare name "deinf.smith"

Replace matches based on equals/equalsIgnoreCase by comparators

Example of possible replacement:

protected Object recoverValue(Object obj, Object methodName, Class<? extends Enum<?>> enumType) throws Exception {
    Object result = null;
    String name = String.valueOf(methodName);
    Method method = enumType.getMethod(name);
    String current = String.valueOf(obj);
    Enum<?>[] values = enumType.getEnumConstants();
    for (Enum<?> e : values) {
        Object base = method.invoke(e);
        if (current.equalsIgnoreCase(String.valueOf(base))) {
            result = e;
            break;
        }
    }
    return result;
}

Create a reader of URL

create a reader which resolves a 'a@href' tag inside a value.

it will be used, for example, on clob or blob converters to find resource fully qualified reference. On time, the resource cache can be used if resource is recurrent.

Create a bytes converter

Which convertes from string to byte array.

Usage: converte a file to bytes in a blob column. If reader do not convert straigth to bytes.

Throw exception when using invalid virtual values in DB2

On referenced table name errors throw an exception to make it clear to the user the reference is wrong

i.e.
<table>
   <caption>Users</caption>
.....
</table>

sgbd.cfg.xml
<table alias="Account">
    <column alias="User" table="Users" virtual="true"/>
</table>

Make data parsers return null when empty string is passed

java.text.ParseException: Unparseable date: ""
at java.text.DateFormat.parse(DateFormat.java:357)
at org.specrunner.converters.core.ConverterDatePatternArgs.convert(ConverterDatePatternArgs.java:67)
at org.specrunner.util.xom.node.core.NodeHolderDefault.getLocal(NodeHolderDefault.java:447)
at org.specrunner.util.xom.node.core.NodeHolderDefault.getObject(NodeHolderDefault.java:414)
at org.specrunner.util.xom.node.core.NodeHolderDefault.getObject(NodeHolderDefault.java:409)

Create an enum converter with normalized texts

Example:
enum Status {
NOT_IMPLEMENTED("Not implemented"), PENDING("Pending");
private String text;
public String getText(){
return text;
}
}

XML:
example with extra lines:
<span converter="enumValueNorm">not<br/> implemented</span>

example case insensive:
<span converter="enumValueNorm">pending</span>.

Integrate Phantom JS browser factory

Add webdriver factory for PhantomJS:

DesiredCapabilities desiredCapabilities = new DesiredCapabilities();
desiredCapabilities.setCapability(PhantomJSDriverService.PHANTOMJS_CLI_ARGS, new String[] {
"--web-security=false", "--ssl-protocol=any", "--ignore-ssl-errors=true",
"--webdriver-loglevel=INFO"});
desiredCapabilities.setCapability(PhantomJSDriverService.PHANTOMJS_EXECUTABLE_PATH_PROPERTY,
"D:/ThiagoSantos/programas/phantomjs-2.0.0-windows/bin/phantomjs.exe");

        fm.add(PluginBrowser.FEATURE_WEBDRIVER_INSTANCE, new PhantomJSDriver(desiredCapabilities));

Cache settings on AbstractCacheFactory

Replace:
@OverRide
public <K, T> ICache<K, T> newCache(String name) {
return create(name, new ICacheCleaner() {
@OverRide
public void destroy(T obj) {
// do nothing.
}
});
}

by
@OverRide
public <K, T> ICache<K, T> newCache(String name) {
return newCache(name, new ICacheCleaner() {
@OverRide
public void destroy(T obj) {
// do nothing.
}
});
}

in order to get cache settings on cache creation.

Adjust time information.

Error on format:

+------ STATISTICS (main) ------+
NUMBER OF TESTS: 105
TOTAL TIME: 4615445 ms [ 01:76:4615.445 (HH:mm:ss.SSS) ]
AVERAGE TIME: 43956,62 ms
STATUS: [failure=14, success=91]
TYPES: [assertion=1092, action=31408, undef=170]
+-------------------------------+

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.