Click here to load reader

Introduction to Software Engineering: Tools and Environments

  • Upload
    sagira

  • View
    62

  • Download
    0

Embed Size (px)

DESCRIPTION

Introduction to Software Engineering: Tools and Environments. Session 10. Oded Lachish Room: Mal 405 Visiting Hours: Wednesday 17:00 to 20:00 Email: [email protected] Module URL: http://www.dcs.bbk.ac.uk/~oded/Tools2012-2013/Web/Tools2012-2013.html. Last time. - PowerPoint PPT Presentation

Citation preview

Introduction to Software Engineering: Tools and Environments

Oded Lachish

Room: Mal 405 Visiting Hours: Wednesday 17:00 to 20:00Email: [email protected] URL:http://www.dcs.bbk.ac.uk/~oded/Tools2012-2013/Web/Tools2012-2013.html

Introduction to Software Engineering: Tools and EnvironmentsSession 101Last timeDocumentation tools Doxygen and eUML2

Code generation tools eUML2

Ant revisited222Tools Side Dish

EnvironmentVariables333Environment Variables4How did eclipse know where to find java

Scan the directory structure (bad idea, why?)

Environment variables Probably all operation systems have environment variables.Environment variables can be accessed by running processesEnvironment variables are also play a significant role in the operation of the OS44Important - Environment VariablesPATH list of directories to look for executables

JAVA_PATH location of the Java related files

ANT_PATH location of the Ant related files555Setting - Environment Variables WindowsRight click6

Left click66Environment Variables - 7

Left click77Environment Variables - 8

Left click88Environment Variables - 9

You can add new system variables and edit existing ones99Installing Ant and Setting Environment VariablesURL to download fromhttp://ant.apache.org/bindownload.cgiDownload:apache-ant-1.8.2-bin.zip

Store contents in C:\So C:\apache-ant-1.8.2 exists

101010Setting Ant Environment VariablesSet ANT_HOME to 11

First left click1111Add Ant to Path Environment Variables12

First left clickSemi colon separates directories in list, add ; C:\apache-ant-1.8.2\binat the end of the list 1212Java Server and Servlets131313Why do we need Javaserver and Servlets14We are going to install JenkinsJenkins is used through a browser Jenkins uses dynamic page generationThe standard browser does supply a sufficient environment for this goalJenkins requires a Javaserver for this goalWe shall use Tomcat as our Javaserver and run Jenkins a java servelet (an extension to Tomcat)1414Download Tomcat15URL to download fromhttp://tomcat.apache.org/download-60.cgiDownload:32-bit/64-bit Windows Service Installer Execute (select all components)

1515Tomcat Installation User Name and Password16

Fill-inMake sure you remember this we will need it 1616

Tomcat Installation Java Virtual Machine17Make sure correct1717

Tomcat Destination18Remember, will be useful1818

Apache Tomcat19Left click1919

Apache Tomcat Server Status20Left click2020

21This shouldnt be there at this stage 2121Next Stage222222Until nowWe have covered many SDLC tools from a single developer s point of view.

23LocalIndividualDeveloper

IntegrationCollected work of IndividualDevelopers

TestingQA teamEnvironment

Project point of view(large project) From here on2323Single Developers Toolslight weightEasy to learnIntegrated with IDETrivial to install and set

Massive number of available tools

24Project Scale ToolsHEAVYEasy to learn?Require their own serverInstallation may require significant effortRelatively small variety of tools

2424Continuous Integration252525IntegrationWhere all the code goes to (and also the unit tests)

When things go wrong here the price is high

This is the reason the focus is on minimizing the damage when things go wrong262626Continuous IntegrationIntegrate code as soon as possible.Why?

Each time only a small portion of code is added or changed. Why?

Problems are detected earlierEasier to find the problem272727Jenkins282828What is JenkinsA crucial element in continuous integration has two main goals:

Continuously build and test software projects

Monitor externally run jobs292929Work Flow with JenkinsA team member/ members commit code to source control repository30Jenkins detects that new code has been committedJenkins uses Build Tools to build the project and Test tools to test the project Jenkins uses the resulting files to generate reportsJenkins send notification if anything went wrong (build, test failed etc.)3030Jenkins as Part of the Big PictureEasy installation: java -jar jenkins.war, or deploy it in a servlet container. No additional install, no database.

Easy configuration: can be configured entirely from its friendly web GUI with extensive on-the-fly error checks and inline help. There's no need to tweak XML manually anymore, although if you'd like to do so, you can do that, too.

Change set support: can generate a list of changes made into the build from Subversion/CVS. This is also done in a fairly efficient fashion, to reduce the load on the repository. 313131Jenkins as Part of the Big PicturePermanent links: Jenkins gives you clean readable URLs for most of its pages, including some permalinks like "latest build"/"latest successful build", so that they can be easily linked from elsewhere.

RSS/E-mail/IM Integration: Monitor build results by RSS or e-mail to get real-time notifications on failures.

JUnit/TestNG test reporting: JUnit test reports can be tabulated, summarized, and displayed with history information, such as when it started breaking, etc. History trend is plotted into a graph.323232Jenkins as Part of the Big PictureDistributed builds: Jenkins can distribute build/test loads to multiple computers. This lets you get the most out of those idle workstations sitting beneath developers' desks.

File fingerprinting: Jenkins can keep track of which build produced which jars, and which build is using which version of jars, and so on. This works even for jars that are produced outside Jenkins, and is ideal for projects to track dependency.

Plugin Support: Jenkins can be extended via 3rd party plugins. You can write plugins to make Jenkins support tools/processes that your team uses.333333Jenkins as Part of the Big PictureAn easy to configure tool that is responsible for the following:

Make sure that everything that should be executed is executed when and as soon as possible

Collect all the information and process it into coherent reports (imagine have 10 different tools each with its own report)

343434JenkinsLeg Work35353536Jenkins .war file

jenkins.war37

What to do with the .war fileJenkins Nice to Meat You38

Left click3838Jenkins Plug-ins39

Left click3939Jenkins Plugin manager40

Left click4040Jenkins Git Plugin Installation Success41

4141JenkinsLeg WorkNew Project424242Jenkins new projectWrite a new Java projectAdd an Ant build script to the projectStore the project in a Git repository

434343Jenkins New Job44

Left click4444

Jenkins New Job 245Fill inSelect4545

Jenkins New Job Top46Fill inSelect4646

Jenkins New Job Middle47SelectUpdate to your git repository4747

Jenkins New Job48Left clickUpdate4848

Jenkins New Job (actually after)49Left clickLeft click4949

Jenkins Build Page50Left click5050

Jenkins Console Output51Left click5151

Jenkins Git Build Data525252What Happened After First Build?53

Jenkins Cloned the Project Jenkins used the Ant script to build the project5353Other Things we Could have Done54

5454JenkinsLeg WorkTriggering a Build555555Jenkins When to Build?56Can be done manually (as we already did)Can be done in fixed intervals in general this is not recommendedPolling build when the project changed5656Jenkins Triggering a Build (project configure)57I think this should get it to poll every minute

Check it out5757Jenkins Git Polling Log58

5858Jenkins Build History59

5959JenkinsLeg WorkOther Features606060

Jenkins RSS61You can use RSS to get updated

Left click6161Manage Jenkins62

6262Configure Jenkins63

6363

Can execute concurrent builds guess where?

Configure Jenkins e-mail notification64You can use e-mail notification to get updated

You can change the URL6464