- 浏览: 2542606 次
- 性别:
- 来自: 成都
文章分类
最新评论
-
nation:
你好,在部署Mesos+Spark的运行环境时,出现一个现象, ...
Spark(4)Deal with Mesos -
sillycat:
AMAZON Relatedhttps://www.godad ...
AMAZON API Gateway(2)Client Side SSL with NGINX -
sillycat:
sudo usermod -aG docker ec2-use ...
Docker and VirtualBox(1)Set up Shared Disk for Virtual Box -
sillycat:
Every Half an Hour30 * * * * /u ...
Build Home NAS(3)Data Redundancy -
sillycat:
3 List the Cron Job I Have>c ...
Build Home NAS(3)Data Redundancy
Jbehave(2)Some Improvement and POM changes
I design the Jbehave project at first. And my colleagues have some new idea about that and he made some changes to that.
First one is about how to run Jbehave, before, I configure annotation and spring configuration in my project. Right now he has cleaned up them.
The JUnit class which can be run in eclipse is as follow:
package com.easybddweb.vendors.baidu;
import static java.util.Arrays.asList;
import static org.jbehave.core.io.CodeLocations.codeLocationFromClass;
import java.util.ArrayList;
import java.util.List;
import org.jbehave.core.io.StoryFinder;
import com.easybddweb.core.story.WebsiteStory;
public class BaiduStories extends WebsiteStory {
protected List<String> storyPaths() {
List<String> list = new StoryFinder().findPaths(
codeLocationFromClass(this.getClass()).getFile(),
asList("**/baidu/*.story"), null);
return list;
}
@Override
protected List<Object> getStepsInstances() {
BaiduSteps steps = new BaiduSteps(super.getFirefoxWebDriverProvider());
List<Object> list = new ArrayList<Object>();
list.add(steps);
return list;
}
}
And the basic class used here is as follow:
package com.easybddweb.core.story;
import static org.jbehave.core.io.CodeLocations.codeLocationFromClass;
import static org.jbehave.core.reporters.Format.CONSOLE;
import static org.jbehave.web.selenium.WebDriverHtmlOutput.WEB_DRIVER_HTML;
import java.util.List;
import org.jbehave.core.configuration.Configuration;
import org.jbehave.core.embedder.StoryControls;
import org.jbehave.core.failures.FailingUponPendingStep;
import org.jbehave.core.io.LoadFromClasspath;
import org.jbehave.core.junit.JUnitStories;
import org.jbehave.core.reporters.CrossReference;
import org.jbehave.core.reporters.Format;
import org.jbehave.core.reporters.StoryReporterBuilder;
import org.jbehave.core.steps.CandidateSteps;
import org.jbehave.core.steps.InstanceStepsFactory;
import org.jbehave.web.selenium.ContextView;
import org.jbehave.web.selenium.FirefoxWebDriverProvider;
import org.jbehave.web.selenium.LocalFrameContextView;
import org.jbehave.web.selenium.SeleniumConfiguration;
import org.jbehave.web.selenium.SeleniumContext;
import org.jbehave.web.selenium.SeleniumContextOutput;
import org.jbehave.web.selenium.SeleniumStepMonitor;
import org.jbehave.web.selenium.WebDriverProvider;
public abstract class WebsiteStory extends JUnitStories {
CrossReference crossReference = new CrossReference().withJsonOnly()
.withOutputAfterEachStory(true)
.excludingStoriesWithNoExecutedScenarios(true);
ContextView contextView = new LocalFrameContextView().sized(500, 100);
SeleniumContext seleniumContext = new SeleniumContext();
SeleniumStepMonitor stepMonitor = new SeleniumStepMonitor(contextView,
seleniumContext, crossReference.getStepMonitor());
Format[] formats = new Format[] {
new SeleniumContextOutput(seleniumContext), CONSOLE,
WEB_DRIVER_HTML };
StoryReporterBuilder reporterBuilder = new StoryReporterBuilder()
.withCodeLocation(codeLocationFromClass(this.getClass()))
.withFailureTrace(true).withFailureTraceCompression(true)
.withDefaultFormats().withFormats(formats)
.withCrossReference(crossReference);
public Configuration configuration() {
return new SeleniumConfiguration()
.useSeleniumContext(seleniumContext)
.useFailureStrategy(new FailingUponPendingStep())
.useStoryControls(
new StoryControls().doResetStateBeforeScenario(false))
.useStepMonitor(stepMonitor)
.useStoryLoader(new LoadFromClasspath(this.getClass()))
.useStoryReporterBuilder(reporterBuilder);
}
public List<CandidateSteps> candidateSteps() {
return new InstanceStepsFactory(configuration(), getStepsInstances())
.createCandidateSteps();
}
protected abstract List<Object> getStepsInstances();
protected WebDriverProvider getFirefoxWebDriverProvider() {
return new FirefoxWebDriverProvider();
}
}
And he also have some new idea about how to run the story. For example, if I want to select only baidu stories. I can use MAVEN2 command like this:
>mvn clean install -Pbaidu
The related maven2 configuration in pom.xml is as follow:
<projectxmlns="http://maven.apache.org/POM/4.0.0"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"]] >
<modelVersion]] > 4.0.0</modelVersion]] >
<groupId]] > com.sillycat.easybddweb</groupId]] >
<artifactId]] > easybddweb</artifactId]] >
<name]] > easybddweb</name]] >
<version]] > 1.0</version]] >
<properties]] >
<jbehave.core.version]] > 3.5.4</jbehave.core.version]] >
<jbehave.web.version]] > 3.4.3</jbehave.web.version]] >
<jbehave.site.version]] > 3.1.1</jbehave.site.version]] >
<selenium.version]] > 2.17.0</selenium.version]] >
<ignore.failures]] > false</ignore.failures]] >
<meta.filter></meta.filter]] >
<threads]] > 1</threads]] >
<skip]] > false</skip]] >
<stories]] > **/*Stories.java</stories]] >
</properties]] >
<build]] >
<pluginManagement]] >
<plugins]] >
<plugin]] >
<groupId]] > org.apache.maven.plugins</groupId]] >
<artifactId]] > maven-compiler-plugin</artifactId]] >
<version]] > 2.3.2</version]] >
<configuration]] >
<source]] > 1.6</source]] >
<target]] > 1.6</target]] >
</configuration]] >
</plugin]] >
</plugins]] >
</pluginManagement]] >
<resources]] >
<resource]] >
<directory]] > ${basedir}/src/main/resources</directory]] >
<filtering]] > false</filtering]] >
</resource]] >
<resource]] >
<directory]] > ${basedir}/src/main/stories</directory]] >
<filtering]] > false</filtering]] >
</resource]] >
</resources]] >
<plugins]] >
<plugin]] >
<groupId]] > org.jbehave</groupId]] >
<artifactId]] > jbehave-maven-plugin</artifactId]] >
<version]] > ${jbehave.core.version}</version]] >
<executions]] >
<execution]] >
<id]] > unpack-view-resources</id]] >
<phase]] > process-resources</phase]] >
<goals]] >
<goal]] > unpack-view-resources</goal]] >
</goals]] >
</execution]] >
<execution]] >
<id]] > embeddable-stories</id]] >
<phase]] > integration-test</phase]] >
<configuration]] >
<includes]] >
<include]] > ${stories}</include]] >
</includes]] >
<excludes/>
<generateViewAfterStories]] > true</generateViewAfterStories]] >
<ignoreFailureInStories]] > ${ignore.failures}</ignoreFailureInStories]] >
<ignoreFailureInView]] > ${ignore.failures}</ignoreFailureInView]] >
<threads]] > ${threads}</threads]] >
<skip]] > ${skip}</skip]] >
<metaFilters]] >
<metaFilter]] > ${meta.filter}</metaFilter]] >
</metaFilters]] >
</configuration]] >
<goals]] >
<goal]] > run-stories-as-embeddables</goal]] >
</goals]] >
</execution]] >
<execution]] >
<id]] > report-stepdocs</id]] >
<phase]] > integration-test</phase]] >
<configuration]] >
<includes]] >
<include]] > ${stories}</include]] >
</includes]] >
</configuration]] >
<goals]] >
<goal]] > report-stepdocs-as-embeddables</goal]] >
</goals]] >
</execution]] >
</executions]] >
</plugin]] >
</plugins]] >
</build]] >
<dependencies]] >
<!-- Jackson -->
<dependency]] >
<groupId]] > org.codehaus.jackson</groupId]] >
<artifactId]] > jackson-mapper-asl</artifactId]] >
<version]] > 1.9.5</version]] >
</dependency]] >
<!-- JBehave -->
<dependency]] >
<groupId]] > org.jbehave</groupId]] >
<artifactId]] > jbehave-core</artifactId]] >
<version]] > ${jbehave.core.version}</version]] >
<classifier]] > resources</classifier]] >
<type]] > zip</type]] >
</dependency]] >
<dependency]] >
<groupId]] > org.jbehave.site</groupId]] >
<artifactId]] > jbehave-site-resources</artifactId]] >
<version]] > ${jbehave.site.version}</version]] >
<type]] > zip</type]] >
</dependency]] >
<dependency]] >
<groupId]] > org.jbehave.web</groupId]] >
<artifactId]] > jbehave-web-selenium</artifactId]] >
<version]] > ${jbehave.web.version}</version]] >
<exclusions]] >
<exclusion]] >
<groupId]] > org.seleniumhq.selenium</groupId]] >
<artifactId]] > selenium-java</artifactId]] >
</exclusion]] >
</exclusions]] >
</dependency]] >
<dependency]] >
<groupId]] > org.seleniumhq.selenium.fluent</groupId]] >
<artifactId]] > fluent-selenium</artifactId]] >
<version]] > 1.0-beta-4</version]] >
<optional]] > true</optional]] >
<exclusions]] >
<exclusion]] >
<groupId]] > org.seleniumhq.selenium</groupId]] >
<artifactId]] > selenium-java</artifactId]] >
</exclusion]] >
</exclusions]] >
</dependency]] >
<dependency]] >
<groupId]] > org.seleniumhq.selenium</groupId]] >
<artifactId]] > selenium-java</artifactId]] >
<version]] > ${selenium.version}</version]] >
</dependency]] >
<dependency]] >
<groupId]] > org.jbehave</groupId]] >
<artifactId]] > jbehave-spring</artifactId]] >
<version]] > ${jbehave.core.version}</version]] >
</dependency]] >
<dependency]] >
<groupId]] > org.hamcrest</groupId]] >
<artifactId]] > hamcrest-core</artifactId]] >
<version]] > 1.3.RC2</version]] >
</dependency]] >
<!-- HTTP Apache dependencies -->
<dependency]] >
<groupId]] > org.apache.httpcomponents</groupId]] >
<artifactId]] > httpclient</artifactId]] >
<version]] > 4.1.3</version]] >
</dependency]] >
</dependencies]] >
<profiles]] >
<!-- Story for each website -->
<profile]] >
<!-- baidu -->
<id]] > baidu</id]] >
<properties]] >
<stories]] > **/baidu/*Stories.java</stories]] >
</properties]] >
</profile]] >
<profile]] >
<!-- google -->
<id]] > nba</id]] >
<properties]] >
<stories]] > **/google/*Stories.java</stories]] >
</properties]] >
</profile]] >
</profiles]] >
</project]] >
And this project will be host on easybddweb project in version 2.0.
The project in my dropbox is as follow:
>tar zcvf easybddweb.tar.gz easybddweb
>tar zxvf easybddweb.tar.gz
references:
I design the Jbehave project at first. And my colleagues have some new idea about that and he made some changes to that.
First one is about how to run Jbehave, before, I configure annotation and spring configuration in my project. Right now he has cleaned up them.
The JUnit class which can be run in eclipse is as follow:
package com.easybddweb.vendors.baidu;
import static java.util.Arrays.asList;
import static org.jbehave.core.io.CodeLocations.codeLocationFromClass;
import java.util.ArrayList;
import java.util.List;
import org.jbehave.core.io.StoryFinder;
import com.easybddweb.core.story.WebsiteStory;
public class BaiduStories extends WebsiteStory {
protected List<String> storyPaths() {
List<String> list = new StoryFinder().findPaths(
codeLocationFromClass(this.getClass()).getFile(),
asList("**/baidu/*.story"), null);
return list;
}
@Override
protected List<Object> getStepsInstances() {
BaiduSteps steps = new BaiduSteps(super.getFirefoxWebDriverProvider());
List<Object> list = new ArrayList<Object>();
list.add(steps);
return list;
}
}
And the basic class used here is as follow:
package com.easybddweb.core.story;
import static org.jbehave.core.io.CodeLocations.codeLocationFromClass;
import static org.jbehave.core.reporters.Format.CONSOLE;
import static org.jbehave.web.selenium.WebDriverHtmlOutput.WEB_DRIVER_HTML;
import java.util.List;
import org.jbehave.core.configuration.Configuration;
import org.jbehave.core.embedder.StoryControls;
import org.jbehave.core.failures.FailingUponPendingStep;
import org.jbehave.core.io.LoadFromClasspath;
import org.jbehave.core.junit.JUnitStories;
import org.jbehave.core.reporters.CrossReference;
import org.jbehave.core.reporters.Format;
import org.jbehave.core.reporters.StoryReporterBuilder;
import org.jbehave.core.steps.CandidateSteps;
import org.jbehave.core.steps.InstanceStepsFactory;
import org.jbehave.web.selenium.ContextView;
import org.jbehave.web.selenium.FirefoxWebDriverProvider;
import org.jbehave.web.selenium.LocalFrameContextView;
import org.jbehave.web.selenium.SeleniumConfiguration;
import org.jbehave.web.selenium.SeleniumContext;
import org.jbehave.web.selenium.SeleniumContextOutput;
import org.jbehave.web.selenium.SeleniumStepMonitor;
import org.jbehave.web.selenium.WebDriverProvider;
public abstract class WebsiteStory extends JUnitStories {
CrossReference crossReference = new CrossReference().withJsonOnly()
.withOutputAfterEachStory(true)
.excludingStoriesWithNoExecutedScenarios(true);
ContextView contextView = new LocalFrameContextView().sized(500, 100);
SeleniumContext seleniumContext = new SeleniumContext();
SeleniumStepMonitor stepMonitor = new SeleniumStepMonitor(contextView,
seleniumContext, crossReference.getStepMonitor());
Format[] formats = new Format[] {
new SeleniumContextOutput(seleniumContext), CONSOLE,
WEB_DRIVER_HTML };
StoryReporterBuilder reporterBuilder = new StoryReporterBuilder()
.withCodeLocation(codeLocationFromClass(this.getClass()))
.withFailureTrace(true).withFailureTraceCompression(true)
.withDefaultFormats().withFormats(formats)
.withCrossReference(crossReference);
public Configuration configuration() {
return new SeleniumConfiguration()
.useSeleniumContext(seleniumContext)
.useFailureStrategy(new FailingUponPendingStep())
.useStoryControls(
new StoryControls().doResetStateBeforeScenario(false))
.useStepMonitor(stepMonitor)
.useStoryLoader(new LoadFromClasspath(this.getClass()))
.useStoryReporterBuilder(reporterBuilder);
}
public List<CandidateSteps> candidateSteps() {
return new InstanceStepsFactory(configuration(), getStepsInstances())
.createCandidateSteps();
}
protected abstract List<Object> getStepsInstances();
protected WebDriverProvider getFirefoxWebDriverProvider() {
return new FirefoxWebDriverProvider();
}
}
And he also have some new idea about how to run the story. For example, if I want to select only baidu stories. I can use MAVEN2 command like this:
>mvn clean install -Pbaidu
The related maven2 configuration in pom.xml is as follow:
<projectxmlns="http://maven.apache.org/POM/4.0.0"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"]] >
<modelVersion]] > 4.0.0</modelVersion]] >
<groupId]] > com.sillycat.easybddweb</groupId]] >
<artifactId]] > easybddweb</artifactId]] >
<name]] > easybddweb</name]] >
<version]] > 1.0</version]] >
<properties]] >
<jbehave.core.version]] > 3.5.4</jbehave.core.version]] >
<jbehave.web.version]] > 3.4.3</jbehave.web.version]] >
<jbehave.site.version]] > 3.1.1</jbehave.site.version]] >
<selenium.version]] > 2.17.0</selenium.version]] >
<ignore.failures]] > false</ignore.failures]] >
<meta.filter></meta.filter]] >
<threads]] > 1</threads]] >
<skip]] > false</skip]] >
<stories]] > **/*Stories.java</stories]] >
</properties]] >
<build]] >
<pluginManagement]] >
<plugins]] >
<plugin]] >
<groupId]] > org.apache.maven.plugins</groupId]] >
<artifactId]] > maven-compiler-plugin</artifactId]] >
<version]] > 2.3.2</version]] >
<configuration]] >
<source]] > 1.6</source]] >
<target]] > 1.6</target]] >
</configuration]] >
</plugin]] >
</plugins]] >
</pluginManagement]] >
<resources]] >
<resource]] >
<directory]] > ${basedir}/src/main/resources</directory]] >
<filtering]] > false</filtering]] >
</resource]] >
<resource]] >
<directory]] > ${basedir}/src/main/stories</directory]] >
<filtering]] > false</filtering]] >
</resource]] >
</resources]] >
<plugins]] >
<plugin]] >
<groupId]] > org.jbehave</groupId]] >
<artifactId]] > jbehave-maven-plugin</artifactId]] >
<version]] > ${jbehave.core.version}</version]] >
<executions]] >
<execution]] >
<id]] > unpack-view-resources</id]] >
<phase]] > process-resources</phase]] >
<goals]] >
<goal]] > unpack-view-resources</goal]] >
</goals]] >
</execution]] >
<execution]] >
<id]] > embeddable-stories</id]] >
<phase]] > integration-test</phase]] >
<configuration]] >
<includes]] >
<include]] > ${stories}</include]] >
</includes]] >
<excludes/>
<generateViewAfterStories]] > true</generateViewAfterStories]] >
<ignoreFailureInStories]] > ${ignore.failures}</ignoreFailureInStories]] >
<ignoreFailureInView]] > ${ignore.failures}</ignoreFailureInView]] >
<threads]] > ${threads}</threads]] >
<skip]] > ${skip}</skip]] >
<metaFilters]] >
<metaFilter]] > ${meta.filter}</metaFilter]] >
</metaFilters]] >
</configuration]] >
<goals]] >
<goal]] > run-stories-as-embeddables</goal]] >
</goals]] >
</execution]] >
<execution]] >
<id]] > report-stepdocs</id]] >
<phase]] > integration-test</phase]] >
<configuration]] >
<includes]] >
<include]] > ${stories}</include]] >
</includes]] >
</configuration]] >
<goals]] >
<goal]] > report-stepdocs-as-embeddables</goal]] >
</goals]] >
</execution]] >
</executions]] >
</plugin]] >
</plugins]] >
</build]] >
<dependencies]] >
<!-- Jackson -->
<dependency]] >
<groupId]] > org.codehaus.jackson</groupId]] >
<artifactId]] > jackson-mapper-asl</artifactId]] >
<version]] > 1.9.5</version]] >
</dependency]] >
<!-- JBehave -->
<dependency]] >
<groupId]] > org.jbehave</groupId]] >
<artifactId]] > jbehave-core</artifactId]] >
<version]] > ${jbehave.core.version}</version]] >
<classifier]] > resources</classifier]] >
<type]] > zip</type]] >
</dependency]] >
<dependency]] >
<groupId]] > org.jbehave.site</groupId]] >
<artifactId]] > jbehave-site-resources</artifactId]] >
<version]] > ${jbehave.site.version}</version]] >
<type]] > zip</type]] >
</dependency]] >
<dependency]] >
<groupId]] > org.jbehave.web</groupId]] >
<artifactId]] > jbehave-web-selenium</artifactId]] >
<version]] > ${jbehave.web.version}</version]] >
<exclusions]] >
<exclusion]] >
<groupId]] > org.seleniumhq.selenium</groupId]] >
<artifactId]] > selenium-java</artifactId]] >
</exclusion]] >
</exclusions]] >
</dependency]] >
<dependency]] >
<groupId]] > org.seleniumhq.selenium.fluent</groupId]] >
<artifactId]] > fluent-selenium</artifactId]] >
<version]] > 1.0-beta-4</version]] >
<optional]] > true</optional]] >
<exclusions]] >
<exclusion]] >
<groupId]] > org.seleniumhq.selenium</groupId]] >
<artifactId]] > selenium-java</artifactId]] >
</exclusion]] >
</exclusions]] >
</dependency]] >
<dependency]] >
<groupId]] > org.seleniumhq.selenium</groupId]] >
<artifactId]] > selenium-java</artifactId]] >
<version]] > ${selenium.version}</version]] >
</dependency]] >
<dependency]] >
<groupId]] > org.jbehave</groupId]] >
<artifactId]] > jbehave-spring</artifactId]] >
<version]] > ${jbehave.core.version}</version]] >
</dependency]] >
<dependency]] >
<groupId]] > org.hamcrest</groupId]] >
<artifactId]] > hamcrest-core</artifactId]] >
<version]] > 1.3.RC2</version]] >
</dependency]] >
<!-- HTTP Apache dependencies -->
<dependency]] >
<groupId]] > org.apache.httpcomponents</groupId]] >
<artifactId]] > httpclient</artifactId]] >
<version]] > 4.1.3</version]] >
</dependency]] >
</dependencies]] >
<profiles]] >
<!-- Story for each website -->
<profile]] >
<!-- baidu -->
<id]] > baidu</id]] >
<properties]] >
<stories]] > **/baidu/*Stories.java</stories]] >
</properties]] >
</profile]] >
<profile]] >
<!-- google -->
<id]] > nba</id]] >
<properties]] >
<stories]] > **/google/*Stories.java</stories]] >
</properties]] >
</profile]] >
</profiles]] >
</project]] >
And this project will be host on easybddweb project in version 2.0.
The project in my dropbox is as follow:
>tar zcvf easybddweb.tar.gz easybddweb
>tar zxvf easybddweb.tar.gz
references:
发表评论
-
RESTful JSON Mock Server
2015-03-19 11:58 791RESTful JSON Mock Server C ... -
Performance Tool(7)Improve Lua and Wrk
2015-01-17 06:37 1031Performance Tool(7)Improve Lua ... -
Performance Tool(6)Gatling Upgrade to 2.1.2 Version Or wrk
2015-01-10 01:15 974Performance Tool(6)Gatling Upg ... -
Performance Tool(5)Upgrade to 2.0.x
2014-08-27 03:34 1124Performance Tool(5)Upgrade to 2 ... -
Performance Tool(4)CSV File Data Feeder
2014-08-25 10:50 1023Performance Tool(4)CSV File Dat ... -
wrk with LuaJIT
2014-08-19 06:30 1327wrk with LuaJITHere is an exa ... -
Performance Tool(3)Gatling Upgrade and Cluster
2014-07-25 02:32 1327Performance Tool(3)Gatling Upgr ... -
WRK a HTTP Benchmarking Tool
2014-03-07 04:42 1139WRK a HTTP Benchmarking Tool1 ... -
Performance Tool(1)Gatling
2013-03-15 05:28 1290Performance Tool(1)Gatling 1. ... -
Jenkins Configuration(4)Improve Shell Script Debug/Info Message
2013-01-07 06:32 1334Jenkins Configuration(4)Improve ... -
Jenkins Configuration(3)Shell Script
2012-12-28 01:17 2673Jenkins Configuration(3)Shell S ... -
Eclipse Plugin(2)SOAP UI
2012-06-08 10:48 1346Eclipse Plugin(2)SOAP UI Plugi ... -
Spring3 and REST Integeration(VII)Controller JUnit Test and Mock/Spring Test MVC
2012-04-06 15:57 1905Spring3 and REST Integeration(V ... -
Spring3 and REST Integration(VI)Controller JUnit Test and Mock/Spring HandlerAda
2012-04-06 15:51 1815Spring3 and REST Integration(VI ... -
Spring3 and REST Integration(V)Controller JUnit Test and Mock/HandlerAdapter
2012-04-06 15:41 2836Spring3 and REST Integration(V) ... -
Spring3 and REST Integration(IV)Controller JUnit Test and Mock/Servlet
2012-04-06 15:13 1976Spring3 and REST Integration(IV ... -
buildr(1)Introduce and Install
2011-12-23 16:37 2180buildr(1)Introduce and Install ... -
Jbehave(1) First Web Page Sample
2011-10-26 15:00 2197Jbehave(1) First Web Page Sampl ... -
WarcraftIII Problem on English Win7
2011-07-25 10:18 1939WarcraftIII Problem on English ... -
Web Performance Test Tool
2011-05-10 15:37 1449Web Performance Test Tool 1. F ...
相关推荐
jbehave source 4.0,详情请查看官网
jbehave core用于BDD Java自动化代码开发jar包
JBehave是一个强大的行为驱动开发(BDD)框架,它使用自然语言来编写可执行的故事,使得非技术人员也能理解测试的意图。这个“jbehave-tutorial-maste”压缩包很可能是JBehave的一个教程项目,旨在帮助用户了解并...
在 Maven 项目中,可以在 `pom.xml` 文件中引入 jBehave 的依赖。同时,还需要配置执行器和故事路径等信息。 **3. 编写故事** 故事的编写应该遵循 AS A(作为一个角色)、I WANT(我想要)和 SO THAT(以便)的...
【标题】"jbehave-pico-3.9-beta-4.zip" 提供的是 JBehave 的一个版本,这是基于 Java 的行为驱动开发(BDD)框架,它使用故事(Stories)来描述软件的行为和功能。JBehave 集成了多种依赖注入框架,其中 ...
**JBehave简介** JBehave 是一个行为驱动开发(Behavior-Driven Development, BDD)框架,用于Java平台。BDD是一种软件开发方法,强调通过描述业务行为来定义需求,而不是传统的技术规范。JBehave使得非技术人员如...
【标题】"jbehave-core-4.0-beta-11.zip" 提供的是 JBehave Core 框架的4.0 beta 11版本。JBehave 是一个行为驱动开发(BDD)框架,它允许软件团队通过自然语言编写可执行的故事,从而促进更清晰的沟通和更高效的...
1. **设置项目结构**:创建一个Maven项目,并配置pom.xml文件,引入jBehave相关的依赖库。 2. **编写故事文件**:使用纯文本格式(如.feature)编写故事文件,描述业务场景。 3. **实现步骤**:根据故事文件中的步骤...
开发者可能在其中找到了`pom.xml`文件,这是Maven项目的配置文件,用于管理依赖关系,如JBehave、Selenium和JUnit的版本。 此外,项目中可能还包含`src/main/java`和`src/test/java`目录,分别用于存放应用的业务...
1. **配置JBehave**: 首先需要在`pom.xml`中添加JBehave和Spring的依赖,确保项目可以使用这两个库。 2. **创建步骤类**: 在`src/main/java`下创建步骤类,这些类将实现故事文件中定义的行为步骤。 3. **编写故事...
2. **配置文件(Configuration Files)**: 如 `pom.xml`(如果是Maven项目)展示了如何在项目中配置JBehave依赖和插件。 3. **故事文件(Story Files)**: `.story` 文件,展示如何以自然语言描述测试场景。 4. **...
解压 jbehave 站点资源并将 jbehave 报告链接到 maven 报告
2. **jBehave框架**:jBehave是Java实现的BDD框架,提供了故事和步骤的结构,使得非技术人员也能理解测试目标。项目会展示如何配置jBehave,以及如何编写故事文件和步骤定义。 3. **TestNG**:TestNG是一个功能丰富...
2. **配置文件**: 如 `pom.xml` 或 `build.gradle`,用于构建和依赖管理。 3. **资源文件**: 包括测试数据、页面对象模型等。 4. **测试报告模板**: 用于自定义 Serenity 输出的测试报告样式。 5. **README 文件**: ...
2. **JBehave**:一个BDD框架,允许用自然语言编写测试,使非技术人员也能理解测试目标。 3. **BDD(Behavior Driven Development)**:一种软件开发方法,强调通过用户的行为来定义软件的需求和规格。 4. **...
JBehave-Web JBehave 是 JBehave 的扩展集合,以与 HTTP 和 Web 相关的方式扩展其功能。模块网络Selenium。 与 Selenium 1.0 和 2.0 的绑定允许 JBehave 在网站上运行。 网络跑者。 一个允许非开发人员同步实验运行...
本教程使用 JBehave 3.x 和 Selenium 2.x 来测试 。 要求 Eclipse 或 Netbeans。 Java SE 1.8 最新版本。 Maven 3.0.3 最新版本 运行故事 这将构建源 mvn clean package 这将运行在 pom.xml 上配置的所有故事 ...
2. **执行测试**:运行Cucumber测试,确保其生成了JSON格式的测试结果。 3. **生成报告**:调用cucumber-reporting的API,传入测试结果JSON文件,生成HTML报告。 4. **自定义**:如果需要,可以根据项目需求修改报告...