How to build the project Repository location: you can ...

looneyvillestaticSoftware and s/w Development

Aug 15, 2012 (5 years and 3 months ago)

213 views

How to build

the
project

Repository location: you can checkout
all project material from
https
://team
-
1
-
scotland
-
yard.googlecode.com/svn/trunk/

Build.xml contains all relevant targets,

it is in the main project direction

to run the project
from s
ource
just run the main project.

Y
ou will be
directed to

the defa
ult welcome page
/theyard

index.jsp, which allows you to sign in and use all functionality of the game after the
authentication. To generate the war file run clean and build on the project
, it can

be found
in the project directory under theyard/dist/
. Generating the metrics

is done by right clicking
on build.xml in netbeans and running target pmd
,

which
because it depends on the other
metrics tasks,
will generate

all the metrics for the project und
er
directory theyard/build/q
a.

To view the qunit test cases , you have to run the project from source and open client
-
Qunit
-
testing.html under webpages. This uses http xml requests in the same way as it
occurs in the jsps and htmls which constitute the

client.

Client Requirements
:

Playing
The Yard
requires a minimum screen resolution of 1024x768, as well as an

HTML5 compliant web browser; and has been tested using the following:

Google Chrome 14

Mozilla Firefox 7

Microsoft Internet Explorer 9

Opera 11

Safari X


Note : More detailed deployment instructions and server requirements can be found in the
manual.


Project metrics
: Discussion


Our test coverage for the java classes comes in at around 30%

overall
. There are some
redeeming factors though. Firstl
y gameserver class
;


the main servlet which links the client
to the game engine
,

was tested using the q
-
unit javascript library, this allows us to directly
query the servlet while it is running
. W
e did this because it tests the servlet on the container
(to
mcat) that it is being deployed on.

U
sing mock objects only simulate
s

this situation
.

The
code coverage tool we used “emma” can only generate metrics for java j
-
unit tests , so q
-
unit tests aren’t included in the coverage report
. The game engine test c
overage is arou
nd
50%. The PMD report, which c
hecks code for potential errors can also be found under
/theyard/build/qa. Below is the test coverage report, and jdepend dependency analysis.



Test coverage results

[EMMA v2.0.5312 report, generated Mon Oct
24 14:28:11 NZDT 2011]

-------------------------------------------------------------------------------

OVERALL COVERAGE SUMMARY:


[class, %]

[method, %]

[block, %]


[line, %]



[name]

31% (4/13)!

19% (18/94)!

10% (481/4615)!


11% (98.9/931)!


all class
es


OVERALL STATS SUMMARY:


total packages:

3

total classes:

13

total methods:

94

total executable files:

11

total executable lines:

931

COVERAGE BREAKDOWN BY PACKAGE:

[class, %]

[method, %]

[block, %]

[line, %]


nz.ac.massey.cs.scotlandyard.exceptions

0%

(0/2)!

0% (0/6)!

0% (0/31)!

0% (0/14)!


nz.ac.massey.cs.scotlandyard.server

0% (0/3)!

0% (0/12)!

0% (0/1677)!

0% (0/371)!


nz.ac.massey.cs.scotlandyard.gameengine.impl

50% (4/8)!

24% (18/76)!

17% (481/2907)!

18% (98.9/546)!


-----------
--------------------------------------------------------------------

COVERAGE SUMMARY FOR PACKAGE [nz.ac.massey.cs.scotlandyard.exceptions]:


[class, %]

[method, %]

[block, %]

[line, %]

0% (0/2)!

0% (0/6)!

0% (0/31)!

0% (0/14)!



COVERAGE BREAKDOWN

BY SOURCE FILE:


[class, %]

[method, %]

[block, %]

[line, %]


[name]

0% (0/1)!

0% (0/3)!

0% (0/16)!

0% (0/7)!

MoveException.java

0% (0/1)!

0% (0/3)!

0% (0/15)!

0% (0/7)!

PlayerException.java

------------------------------------------------
-------------------------------

COVERAGE SUMMARY FOR PACKAGE [nz.ac.massey.cs.scotlandyard.server]:


[class, %]

[method, %]

[block, %]

[line, %]


[name]

0% (0/3)!

0% (0/12)!

0% (0/1677)!

0% (0/371)!

nz.ac.massey.cs.scotlandyard.server


COVERAGE BREAKDOWN BY SOURCE FILE:


[class, %]

[method, %]

[block, %]

[line, %]


[name]

0% (0/1)!

0% (0/2)!

0% (0/198)!

0% (0/42)!

gameHelp.java

0% (0/1)!

0% (0/7)!

0% (0/1407)!

0% (0/313)!

gameserver.java

0% (0/1)!

0% (0/3)!

0% (0/72
)!

0% (0/16)!

generator.java

-------------------------------------------------------------------------------

COVERAGE SUMMARY FOR PACKAGE [nz.ac.massey.cs.scotlandyard.gameengine.impl]:


[class, %]

[method, %]

[block, %]


[line, %]


50% (4/8)!

24% (18/
76)!

17% (481/2907)!


18%

(98.9/546)



COVERAGE BREAKDOWN BY SOURCE FILE:


[class, %]

[method, %]

[block, %]

[line, %]


[name]

0% (0/2)!

0% (0/20)!

0% (0/2112)!

0% (0/363)!

Engine.java

0% (0/1)!

0% (0/24)!

0% (0/131)!

0% (0/49)!

Player.ja
va

0% (0/1)!

0% (0/4)!

0% (0/38)!

0% (0/2)!

Role.java

100% (1/1)

58% (11/19)!

53% (102/193)!

57% (30/53)!

MapNode.java

100% (1/1)

50% (2/4)!

87% (59/68)

93% (1.9/2)

Mode.java

100% (2/2)

100% (5/5)

88% (320/365)

87% (67/77)

XMLMapReader.java


JDepend

--------------------------------------------------

-

Package: nz.ac.massey.cs.scotlandyard.exceptions

--------------------------------------------------


Stats:


Total Classes: 2


Concrete Classes: 2


Abstract Classes: 0



Ca: 3


Ce: 0


A: 0


I: 0


D: 1


Abstract Classes:

Concrete Classes:


nz.ac.massey.cs.scotlandyard.exceptions.MoveException


nz.ac.massey.cs.scotlandyard.exceptions.PlayerException


Depends Upon:


Not dependent on any packages.


Used By:


nz.a
c.massey.cs.scotlandyard.gameengine


nz.ac.massey.cs.scotlandyard.gameengine.impl


nz.ac.massey.cs.scotlandyard.server


--------------------------------------------------

-

Package: nz.ac.massey.cs.scotlandyard.gameengine

--------------------------------------------------


Stats:


Total Classes: 3


Concrete Classes: 0


Abstract Classes: 3



Ca: 2


Ce: 2



A: 1


I: 0.5


D: 0.5


Abstract Classes:


nz.ac.massey.cs.scotlandyard.gameengine.EngineInterf
ace


nz.ac.massey.cs.scotlandyard.gameengine.MapNodeInterface


nz.ac.massey.cs.scotlandyard.gameengine.PlayerInterface


Concrete Classes:

Depends Upon:


nz.ac.massey.cs.scotlandyard.exceptions


nz.ac.massey.cs.scotlandyard.gameengine.impl


Used

By:


nz.ac.massey.cs.scotlandyard.gameengine.impl


nz.ac.massey.cs.scotlandyard.server


--------------------------------------------------

-

Package: nz.ac.massey.cs.scotlandyard.gameengine.impl

--------------------------------------------------


Stats:


Total Classes: 8


Concrete Classes: 8


Abstract Classes: 0



Ca: 2


Ce: 2



A: 0


I: 0.5


D: 0.5


Abstract Classes:

Concrete Classes:


nz.ac.massey.cs.scotlandyard.gameengine.impl.Engine


nz.ac.massey.cs.scotlandyard.g
ameengine.impl.Engine$1


nz.ac.massey.cs.scotlandyard.gameengine.impl.MapNode


nz.ac.massey.cs.scotlandyard.gameengine.impl.Mode


nz.ac.massey.cs.scotlandyard.gameengine.impl.Player


nz.ac.massey.cs.scotlandyard.gameengine.impl.Role


nz.ac.m
assey.cs.scotlandyard.gameengine.impl.XMLMapReader


nz.ac.massey.cs.scotlandyard.gameengine.impl.XMLMapReader$1


Depends Upon:


nz.ac.massey.cs.scotlandyard.exceptions


nz.ac.massey.cs.scotlandyard.gameengine


Used By:


nz.ac.massey.cs.scotlandyard.gameengine


nz.ac.massey.cs.scotlandyard.server


--------------------------------------------------

-

Package: nz.ac.massey.cs.scotlandyard.server

--------------------------------------------------

Stats:


Total Classes:
3


Concrete Classes: 3


Abstract Classes: 0



Ca: 0


Ce: 3



A: 0


I: 1


D: 0


Abstract Classes:

Concrete Classes:


nz.ac.massey.cs.scotlandyard.server.gameHelp


nz.ac.massey.cs.scotlandyard.server.gameserver


nz.ac.massey.cs.
scotlandyard.server.generator


Depends Upon:


nz.ac.massey.cs.scotlandyard.exceptions


nz.ac.massey.cs.scotlandyard.gameengine


nz.ac.massey.cs.scotlandyard.gameengine.impl


Used By:


Not used by any packages.

--------------------------------------------------

-

Package Dependency Cycles:

--------------------------------------------------

nz.ac.massey.cs.scotlandyard.gameengine


|


| nz.ac.massey.cs.scotlandyard.gameengine.impl


|
-
> nz.ac.massey.cs.sc
otlandyard.gameengine


nz.ac.massey.cs.scotlandyard.gameengine.impl


|


| nz.ac.massey.cs.scotlandyard.gameengine


|
-
> nz.ac.massey.cs.scotlandyard.gameengine.impl


nz.ac.massey.cs.scotlandyard.server


|


|
-
> nz.ac.massey.cs.scotlandyard.g
ameengine


| nz.ac.massey.cs.scotlandyard.gameengine.impl


|
-
> nz.ac.m
assey.cs.scotlandyard.gameengine


--------------------------------------------------

-

Summary:

--------------------------------------------------


Name, Class Count, Abstract Cl
ass Count, Ca, Ce, A, I, D, V:

nz.ac.massey.cs.scotlandyard.exceptions,2,0,3,0,0,0,1,1

nz.ac.massey.cs.scotlandyard.gameengine,3,3,2,2,1,0.5,0.5,1

nz.ac.massey.cs.scotlandyard.gameengine.impl,8,0,2,2,0,0.5,0.5,1

nz.ac.massey.cs.scotlandyard.server
,3,0,0,3,0,1,0,1