richardwarburton / lambda-behave Goto Github PK
View Code? Open in Web Editor NEWA modern testing and behavioural specification framework for Java 8
Home Page: http://richardwarburton.github.io/lambda-behave/
License: MIT License
A modern testing and behavioural specification framework for Java 8
Home Page: http://richardwarburton.github.io/lambda-behave/
License: MIT License
Some specifications totally fail at being reliable and its hard for a developer to detect them. It would be good to be able to write a log describing a test run and be able to offline analyze a log to detect what is heisen or not.
With multiple describes in a single class, only the last one is being run e.g in https://github.com/RichardWarburton/lambda-behave-examples.git
The same issue is appearing with both Eclipse and IntelliJ.
Specifically not and or.
Make them take a function which can return a value.
@SamirTalwar proposed the ability to run as a library. Need to determine whether his use case is supported by the current API or whether it needs more work.
Currently when we expect some exception we can just check class of expected Exception. It would be useful if some matcher could match on exception's message (maybe event fields of Exception).
Goal: be able to run vertx or spring.
Be able to safely run tests in parallel. Probably some overlap with #6
Some way of doing the equivalent of injecting/resetting mocks like junit has.
Including:
This should come in the form of a log.
Possibly think about read-the-docs
Add a subset of the useful Maven reports / plugins. Feel free to assign to me
A nice readable + hostable dashboard style html report, containing all the information in #8 .
More hamcrest wrapping.
Currently throwing away some stack trace information which tells you where the problem originated from if there's an error. Should show the real origin.
Use a profile to control the release related stuff
isPrintable
and characters above Character.MAX_VALUE
Possible API:
Klass klass = it.mocks(Klass.class);
would reset klass between tests.
this test should not fail IMO:
it.should("expect assertionError", expect -> expect.exception(AssertionError.class, () -> throw new AssertionError());
Infinitest style always on web runner that re-runs specifications as code changes.
Would be great to also be able to log and re-use seed values for randomly generated test suites, in order to ensure determinism. This seems to be the main complaint against quickcheck.
Currently can't support completely async APIs due to expectations throwing exceptions, rather than pushing messages onto some kind of eventbus or handler.
Ideally supporting all the features that junit supports, probably requires removing the dependency of the core on junit.
Got the following exception when trying to run with JUnit 4.5 (it was existing project to which I added lamda-behave):
java.lang.NoSuchFieldError: NULL
at org.junit.runners.ParentRunner.<init>(ParentRunner.java:57)
at org.junit.internal.requests.ClassRequest.buildRunner(ClassRequest.java:33)
at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:28)
Works fine with JUnit 4.11. Created this issue mostly to "document" the exception.
Currently we generate all test case instances up front, it would be nice to be able to do it lazily in order to avoid eating the memory required. Unfortunately this is hard to integrate with junit due to junit needing you to specify your test names up front.
The goal for this issue is to make it easier for people to produce generators for classes in their domain model.
Eg: have a way of producing a constructor for a business domain object such as:
new BDO(someInt, someLong);
With an easy combinator, something like:
constructing(BDO::new).with(integersUpTo(10), longs());
Currently have to manually add each element to the data column, would be good if we could just take streams.
Could just be a Maven plugin incompatibility with Java 8. Feel free to assign to me as a low level bug.
[WARNING] Unable to process class com/insightfullogic/lambdabehave/BehaveRunner.class in JarAnalyzer File /Users/karianna/Documents/workspace/jclarity/lambda-behave/lambda-behave/target/lambda-behave-0.2-SNAPSHOT.jar
org.apache.bcel.classfile.ClassFormatException: Invalid byte tag in constant pool: 18
at org.apache.bcel.classfile.Constant.readConstant(Constant.java:146)
at org.apache.bcel.classfile.ConstantPool.(ConstantPool.java:67)
at org.apache.bcel.classfile.ClassParser.readConstantPool(ClassParser.java:222)
at org.apache.bcel.classfile.ClassParser.parse(ClassParser.java:136)
at org.apache.maven.shared.jar.classes.JarClassesAnalysis.analyze(JarClassesAnalysis.java:92)
at org.apache.maven.report.projectinfo.dependencies.Dependencies.getJarDependencyDetails(Dependencies.java:255)
at org.apache.maven.report.projectinfo.dependencies.renderer.DependenciesRenderer.hasSealed(DependenciesRenderer.java:1454)
at org.apache.maven.report.projectinfo.dependencies.renderer.DependenciesRenderer.renderSectionDependencyFileDetails(DependenciesRenderer.java:536)
at org.apache.maven.report.projectinfo.dependencies.renderer.DependenciesRenderer.renderBody(DependenciesRenderer.java:263)
at org.apache.maven.reporting.AbstractMavenReportRenderer.render(AbstractMavenReportRenderer.java:79)
at org.apache.maven.report.projectinfo.DependenciesReport.executeReport(DependenciesReport.java:186)
at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:190)
at org.apache.maven.plugins.site.ReportDocumentRenderer.renderDocument(ReportDocumentRenderer.java:219)
at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderModule(DefaultSiteRenderer.java:319)
at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.render(DefaultSiteRenderer.java:135)
at org.apache.maven.plugins.site.SiteMojo.renderLocale(SiteMojo.java:175)
at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:138)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Currently can only run a whole class at a time in IDEs, due to the way the junit runner interacts. This probably needs plugins. In priority order:
intellij
maven
eclipse
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.