2012년 1월 6일 금요일

RQM - DOORS Integration Architecture

as-is




to-be



-

Analytic Reporting & Live Reporting

출처 : https://jazz.net/wiki/bin/view/Main/LinkedLifecycleData

Linked Data is a design for sharing decentralized, but interrelated, data on the Web.


At any given point in the development lifecycle it is of great interest to understand how requirements, source code, test cases, and defects are related. Typical questions are,
  • "Which requirements don't have any test cases?" and
  • "How many defects are unresolved for each requirement?" 

Design 1.

One design for integrating this lifecycle data is to develop relational models for each type of development artifact and then store the corresponding relational representations of all the artifacts in a data warehouse where they can be queried, reported on, and analyzed using conventional business intelligence tools such as BIRT and Cognos.

Analytical Reporting



Design 2.

Linked Data offers an alternative way to solve the data integration problem. The key advance here is that Linked Data provides a uniform way to identify artifacts, namely HTTP Uniform Resource Identifiers (URI), and a common data model and representation format for them, Resource Description Framework (RDF). Data integration among mutliple sources of development artifacts is achieved by loading the RDF representations of all the development artifacts into a shared triple store, e.g. Jena, which can be queried using the powerful SPARQL query language.

The main tiers of this architecture are as follows:
  • Data Source Tier - CLM Development Tools that provide Linked Data
  • Reporting and Query Service Tier - Indexer, RDF Triple Store (Jena/TDB), SPARQL Endpoint
  • Presentation Tier - Business Intelligence reporting and analysis (Cognos, BIRT), Document generation (RPE), Faceted browsing 
Live Reporting

-

Indexing & Query

1. 다양한 형태의 resource는 storage에 저장됩니다.

2. property indexing은 저장된 resource로 부터 정보를 추출하여 공통 RDF 형태로 storage에 저장합니다.

3. query는 공통 RDF 형태에 대해 질의하여 결과를 리턴합니다.

예) 내가 작성(공통 property dc:creator에 기반)한 resource(요구사항/작업항목/테스트케이스/...)에 대한 query

예) change set에 link(다양한 storage에 저장된 resource간의 link에 기반)된 resource(작업항목/요구사항/테스트케이스/...)에 대한 query

4. JFS는 두 종류의 index를 빌드합니다. 하나는 property index이고 다른 하나는 full text index입니다.

5. Property 기반 indexer는 resource로 부터 구조화된 property를 추출하여 SQL 비슷한 방식의 query (structured query)를 사용할 수 있도록 합니다.

6. Text indexer는 resource로 부터 text를 추출하여 Apache Lucene 엔진에 제공하여 full text search ("fuzzy" query)를 제공합니다.

7. repotools -reindex는 offline server에 대해 수행됩니다. 기본적으로 query triple store와 Lucene text store를 빌드합니다. 기본적으로 resource의 최근 버전에 대해서만 빌드합니다. 전체 버전에 대한 빌드는 시간비용이 많이 소요되기 때문입니다.

참고 : Jazz Integration Architecture ( https://jazz.net/projects/DevelopmentItem.jsp?href=content/project/plans/jia-overview/index.html )



RDF & SPAQL

출처 : http://www.w3.org/TR/rdf-concepts/

The Resource Description Framework (RDF) is a framework for representing information in the Web.

The underlying structure of any expression in RDF is a collection of triples, each consisting of a subject, a predicate and an object. A set of such triples is called an RDF graph.


  • a subject
  • an object, and 
  • a predicate (also called a property) that denotes a relationship


RDF 예

<http://reqs.com/req/1234>   rdf:type                oslc_rm:Requirement
<http://reqs.com/req/1234>   dcterms:title           "Smooth upgrade path"
<http://reqs.com/req/1234>   oslc_rm:elaboratedBy    <http://reqs.com/req/7772>
<http://reqs.com/req/1234>   oslc_rm:validatedBy     <http://tests.com/test/521>


<http://tests.com/test/521>   rdf:type                oslc_qm:TestCase
<http://tests.com/test/521>   dcterms:title           "Verify compatibility"
<http://tests.com/test/521>   oslc_qm:usesTestScript  <http://tests.com/script/13>


SPARQL is standard query language for RDF datasets

SPARQL 예

SELECT ?uri ?title WHERE {
   ?uri rdf:type              oslc_rm:Requirement .
   ?uri dcterms:title         ?title .}

결과


uri title
<http://reqs.com/req/1234> "Smooth upgrade path"
-

2012년 1월 5일 목요일

TESTRT - Using Eclipse CDT on Windows

출처 : http://www.ibm.com/developerworks/opensource/library/os-eclipse-stlcdt/


Get products and technologies
  • Learn about MinGW, the GNU C/C++ tools for Windows included with Cygwin.
  • Download Cygwin a Linux-like environment for Windows. It consists of two parts: A DLL that acts as a Linux API emulation layer providing substantial Linux API functionality and a collection of tools that provide a Linux look and feel.
  • Once you're done installing, you'll need to add gcc, g++, make, and GDB to your path. (예 : ;C:\MinGW\msys\1.0\bin;C:\MinGW\bin )
  • The Eclipse C/C++ Development Toolkit (CDT) download information contains the latest information about the available versions of CDT. (TestRT 이클립스 클라이언트 사용시 설치 필요없음)

(1) New C project




(2) New > Source Folder.


(3) New > Source File



(4) Project > Build Project


(5) Run > Run Configurations
- 실행할 바이너리를 선택한 후 Apply를 함

- run 버튼을 클릭하여 실행함
- 콘솔의 실행결과를 확인함


(6) C Project를 TestRT Project로 변경

- TDP를 선택합니다.


(7) 프로젝트를 빌드합니다. (Active Configuration은 Debug에서 TestRT로 바뀐 상태임)


(8) 실행파일을 우 클릭 후 Run As > Run instrumented application으로 실행합니다.

(9) 실행결과를 클릭하여 coverage report를 봅니다.


옵션 : 다른 리포트를 보고자 하는 경우에는 TestRT build configuration을 수정합니다.
- 프로젝트 속성에서 다른 리포트를 선택합니다.


- build clean, build project, run instrumented application을 실행합니다.

- 결과를 보기 위해 command windows에서 studio를 실행합니다.


- 결과 리포트를 열람합니다.


-

2012년 1월 4일 수요일

RTC Project Area 목록을 구하기 위한 OSLC 코드

출처 : https://jazz.net/forums/viewtopic.php?t=12745


Http http = new Http();
HttpRequest req = new HttpRequest();

// get the root document link to the catalog

req.setEndpoint(settings[0].ServerAddress__c+settings[0].BaseDocument__c);    
req.setMethod('GET');
res = http.send(req);
if(res.getStatusCode()==200)
{
// get the providers element
Dom.XMLNode providers = res.getBodyDocument().getRootElement().getChildElement('cmServiceProviders', 'http://open-services.net/xmlns/cm/1.0/');
// and the catalog URL
String attr=providers.getAttributeValue('resource','http://www.w3.org/1999/02/22-rdf-syntax-ns#');
req.setEndpoint(attr);
req.setMethod('GET');
// set the userid/pw to operate under.
Blob headerValue = Blob.valueOf(settings[0].UserName__c + ':' + settings[0].UserPW__c);
String authorizationHeader = 'BASIC ' + EncodingUtil.base64Encode(headerValue);
req.setHeader('Authorization', authorizationHeader);
// send the request
res = http.send(req);
 
// should come back with an authorization request redirect (302)
if(res.getStatusCode()==302)
{                      
// get the sessionid string from the returned cookies
String[] cookies = res.getHeader('Set-Cookie').split(';');
String sessionid='';
for(Integer i=0;i<cookies.size();i++)
{
if (cookies[i].startswith('JSESSIONID'))
{    
sessionid=cookies[i];                
break;
}
}

// set the redirect endpoint
req.setEndpoint(res.getHeader('Location'));
// and the session id
req.setHeader('Cookie',sessionid);
req.setMethod('GET');
res = http.send(req);
//
if(res.getStatusCode()==200)
{
//  we will have to deal with form logon later
String pw = settings[0].SecurityString__c;
pw=pw.replaceFirst('uname',settings[0].Username__c);
pw=pw.replaceFirst('upw',settings[0].Userpw__c);
req.setEndpoint(settings[0].ServerAddress__c + pw);
//req.setHeader('Referer',res.getHeader('Location'));
req.setMethod('GET');
req.setHeader('ContentType','application/x-www-form-urlencoded');
req.setHeader('Cookie',sessionid);
res = http.send(req);                    
}
// spin thru the remaining redirects..
while(res.getStatusCode()==302)
{                    
// redirect after login
req.setEndpoint(res.getHeader('Location'));
req.setHeader('Cookie',sessionid);
req.setMethod('GET');
res = http.send(req);
}
// we should have the project list document now
System.debug(res.getHeaderKeys());
System.debug(res.getBody());
// find the first project 'entry' node
Dom.XMLNode project = res.getBodyDocument().getRootElement().getChildElement('entry','http://open-services.net/xmlns/discovery/1.0/');
do
{
Dom.XMLnode provider = project.getChildElement('ServiceProvider','http://open-services.net/xmlns/discovery/1.0/');
String projectName =provider.getChildElement('title','http://purl.org/dc/terms/').getText();
String projectServicesURL = provider.getChildElement('services','http://open-services.net/xmlns/discovery/1.0/').getAttributeValue('resource','http://www.w3.org/1999/02/22-rdf-syntax-ns#');                                                          
req.setEndpoint(projectServicesURL);
req.setHeader('Cookie',sessionid);
req.setMethod('GET');
res = http.send(req);
// get the services list document
if(res.getStatusCode()==200)
{
DOM.XMLNode serviceslist = res.getBodydocument().getRootElement();
//System.debug(serviceslist);
Dom.XMLNode changeRequests = serviceslist.getChildElement('changeRequests','http://open-services.net/xmlns/cm/1.0/');
//System.debug(changeRequests);
Dom.XMLNode workitemFactory = changeRequests.getChildElement('factory','http://open-services.net/xmlns/cm/1.0/');
String workitemCreateUrl;
if(workitemFactory.getAttributeValue('default','http://open-services.net/xmlns/cm/1.0/')=='true')
{
workitemCreateUrl = workitemFactory.getChildElement('url','http://open-services.net/xmlns/cm/1.0/').getText();
system.debug(workitemCreateUrl);
}
String workitemQueryURL = (changeRequests.getChildElement('simpleQuery','http://open-services.net/xmlns/cm/1.0/')).getChildElement('url','http://open-services.net/xmlns/cm/1.0/').getText();
//system.debug(workitemQueryUrl);
//System.debug(workitemfactory);
ExportValue e=new ExportValue(projectName, workitemCreateUrl, workitemQueryURL);
result.add(e);
}
// find the projects parent node
Dom.XMLNode parent = project.getparent();
// remove the project node from the document
parent.removeChild(project);
// find the next project entry
project = parent.getChildElement('entry','http://open-services.net/xmlns/discovery/1.0/');
} while (project!=null);
}
}

2012년 1월 2일 월요일

CCCQ8 CM Architecture Change


  • 간단해진 CCRC WAN Server Version 8 구조

    • 버전8로 오면서 CCRC WAN Server의 성능과 확장성이 배가되었습니다.
    • UCM/CQ 통합시 OSLC(HTTP연결)를 사용하며 CQIntSrv를 사용하지 않음
    • Base CC/CQ 통합시에는 기존의 방식을 사용함
  • CQ CM Server (7.x와 동일)
    • -
    • -