Designing a Test class for a custom Barrier

I had to do an implementation of a custom barrier class using locks as part of my course work. To test my LockBarrier class, I came up with a the following test code. It is working correctly, but I am concerned whether that is the proper way to do. Could you please suggest improvements I can do, especially structuring the classes. I think my way of coding is not the correct one. Any suggesti

设计自定义障碍的测试类

我不得不使用锁作为课程工作的一部分来实现自定义屏障类。 为了测试我的LockBarrier类,我想出了以下测试代码。 它工作正常,但我担心这是否是正确的方法。 你能否建议我可以做的改进,尤其是构建类。 我认为我的编码方式不正确。 欢迎任何建议。 public class TestDriver { private static LockBarrier barrier; static class Runnable1 implements Runnable { public Runnable1()

Alternative build manager to Hudson

I work at a software company where our primary development language is Java. Naturally, we use Hudson for continuous builds, which it works brilliantly for. However, Hudson is not so good at some of the other things we ask it to do. We also use Hudson jobs to deploy binaries, refresh databases, run load testing, run regressions, etc. We really run into trouble when there are build dependencies

哈德森替代建设经理

我在一家软件公司工作,我们的主要开发语言是Java。 当然,我们使用Hudson进行连续构建,这非常出色。 然而,哈德森并不擅长我们要求它做的其他事情。 我们还使用Hudson作业来部署二进制文件,刷新数据库,运行负载测试,运行回归等。当存在构建依赖关系时(即负载测试需要数据库刷新),我们真的遇到了麻烦。 以下是哈德逊不会做的,我们真正需要的一件事: 构建依赖关系:它支持Ant构建的构建依赖关系,但不支持Hudson

What is the difference between Hudson and CruiseControl for Java projects?

I think the title sums it up. I just want to know why one or the other is better for continous integration builds of Java projects from Svn. As a long time CruiseControl committer and someone who has never used Hudson I'm pretty biased, but my take on it is: Hudson is much easier to get up and running (in large part from a nice web interface) and has a very active plugin development comm

Hudson和CruiseControl for Java项目有什么区别?

我认为标题总结了它。 我只想知道为什么这个或那个更适合从Svn持续集成Java项目。 作为CruiseControl提交者和从未使用哈德森的人,我很偏颇,但我承认: Hudson更容易启动和运行(很大程度上来自一个漂亮的Web界面),并且拥有一个非常活跃的插件开发社区。 CruiseControl支持大量第三方软件,并且可以通过插件预配置和include.projects等xml配置完成一些简洁的技巧,让您可以使用项目对配置信息进行版本管理。 如果你

AngularJs end

Given a site with an existing extensive set of test cases written in Java using Selenium for a site, and this site is being re-written in AngularJs, how does one go about integrating the Selenium tests into the new app? I have looked into Protractor, the new recommended end-to-end test runner that uses Selenium, however, this appears to suggest writing test in Javascript. This article goes int

AngularJs结束

鉴于一个站点有一个用Java编写的用Selenium编写的大量测试用例,并且这个站点正在用AngularJs重写,那么如何将Selenium测试集成到新的应用程序中呢? 我已经看过使用Selenium的新建议的端到端测试运行器Protractor,但是,这似乎是建议在Javascript中编写测试。 本文将详细介绍如何使这个设置正常工作,但同样,这些测试是用Javascript编写的。 尽管我想用Javascript编写测试,但我想避免重写,所以想要将现有的集成到一个

Bamboo Vs. Hudson(a.k.a. Jenkins) vs Any other CI systems

Anyone out there have experience with both Hudson and Bamboo? Any thoughts on the relative strengths and weaknesses of these products? Okay, since folks keep mentioning other CI products I'll open this up further. Here are my general problem. I want to setup a CI system for a new project. This project will likely have Java components (WARs and JARs), some python modules, and possibly ev

竹与Vs. 哈德森(又名詹金斯)VS任何其他CI系统

那里的任何人都有哈德森和竹子的经验? 对这些产品的相对优势和劣势有何想法? 好吧,由于人们不断提及其他CI产品,我会进一步开放。 这是我的一般问题。 我想为新项目设置CI系统。 这个项目可能会有Java组件(WARs和JARs),一些python模块,甚至可能还有一个.NET组件。 所以我想要一个CI服务器,可以: 处理多种语言, 将工件部署到服务器(例如,如果所有单元测试都通过,则部署战争)。 我还想要一个与体面的代

Best Practice to distribute a Eclipse setup for a project?

I'm looking for some best practices to rollout/setup a complete project setup with Eclipse to my dev team. It's a maven based project that will work without Eclipse. But we want to distribute a preconfigure Eclipse version that have all plugins installed, we want to have a local update site to rollout update of this setup and so on. Is there any good way to achieve this kind of setup

为项目分发Eclipse设置的最佳实践?

我正在寻找一些最佳实践来为我的开发团队推出一个使用Eclipse的完整项目设置。 这是一个基于Maven的项目,可以在没有Eclipse的情况下工作。 但是我们想要分发一个预配置的Eclipse版本,其中安装了所有的插件,我们希望有一个本地更新站点来推出这个设置的更新等等。 有没有什么好的方法来实现这种设置? 我知道我可以提供包含一些插件的更新站点,但我可以定义一组插件吗? Eclipse pmd,Checkstyle,Findbugs和代码格式

Sonar not analyzing Checkstyle, Findbugs, PMD

I've just updated my local Sonar installation to 3.7 from 3.3. Previously, I've analyzed projects with Sonar using the Maven plugin (clean install sonar:sonar). On this old setup, everything works like a charm, more specifically Checkstyle, Findbugs, PMD violations were added to the Sonar analysis. Since the upgrade, I'm not getting any Checkstyle, Findbugs, PMD results (violation

Sonar不分析Checkstyle,Findbugs,PMD

我刚刚将本地Sonar安装从3.3更新到了3.7。 以前,我使用Maven插件(干净安装声纳:声纳)分析了Sonar项目。 在这个旧的设置中,一切都像魅力一样,更具体地说Checkstyle,Findbugs,PMD违规被添加到Sonar分析中。 自升级以来,我没有得到任何Checkstyle,Findbugs,PMD结果(违规计数== 0,我无法想象这是真实的,因为本地Eclipse PMD运行会导致一些违规行为的解决)。 Sonar 3.7升级期间,我必须删除Sonar上的Checkstyle

How to run Selenium tests with a standalone / containerized server

This question regards how to start a standalone Selenium server - currently it appears as though my junit test will start up the Selenium server for me, and I am looking to do that separately. // selenium test script using junit: package suman; import java.util.concurrent.TimeUnit; import org.junit.AfterClass; import org.junit.Assert; import org.junit.BeforeClass; import org.junit.Test; impor

如何使用独立/集装箱式服务器运行Selenium测试

这个问题关于如何启动一个独立的Selenium服务器 - 目前看起来好像我的junit测试会为我启动Selenium服务器,而且我期望单独执行。 //使用junit的硒测试脚本: package suman; import java.util.concurrent.TimeUnit; import org.junit.AfterClass; import org.junit.Assert; import org.junit.BeforeClass; import org.junit.Test; import org.openqa.selenium.*; import org.openqa.selenium.interactions.*; import org.open

How to know which Hudson version is used by my Jenkins server?

I have a problem with my build on Jenkins and I think it is related to https://issues.jenkins-ci.org/browse/JENKINS-4364 Quoting: I am using rhel5 with hudson 1.321 The issue I am seeing is that when building maven2 projects that take less than 1 minute for their surefire tests to complete, Hudson is marking the build as failed. I've tried several versions of maven (2.2.1, 2.0.10, 2.1.

如何知道我的Jenkins服务器使用哪个Hudson版本?

我在建立Jenkins时遇到问题,我认为它与https://issues.jenkins-ci.org/browse/JENKINS-4364有关 引用: 我用哈德森1.321使用rhel5 我看到的问题是,当构建maven2项目需要不到1分钟的时间才能完成绝对测试时,Hudson会将构建标记为失败。 我已经尝试过几个版本的maven(2.2.1,2.0.10,2.1.0),并且能够从命令行编译好,并且看到测试运行(在哈德森和命令行上),但是当它试图复制/验证测试文件时,从Hudson获取以下错误消

JUnit tests pass in Eclipse but fail in Maven Surefire

I have written some JUnit tests using JUnit 4 and spring-test libraries. When I run the tests inside Eclipse then run fine and pass. But when I run them using Maven (during the build process), they fail giving a spring related error. I am not sure what is causing the problem, JUnit, Surefire or Spring. Here is my test code, spring configuration and the exception that I get from Maven: Perso

Eclipse中的JUnit测试通过,但在Maven Surefire中失败

我已经使用JUnit 4和spring-test库编写了一些JUnit测试。 当我在Eclipse中运行测试时,运行良好并通过。 但是,当我使用Maven运行它们(在构建过程中)时,它们会失败,从而导致与弹簧相关的错误。 我不确定是什么导致了这个问题,JUnit,Surefire还是Spring。 这里是我的测试代码,弹簧配置和我从Maven得到的异常: PersonServiceTest.java package com.xyz.person.test; import static com.xyz.person.util.FjUtil.toFj