<commit_before>#!/usr/bin/env python
#
# WS-I interoperability test http://www.ws-i.org/deliverables/workinggroup.aspx?wg=testingtools
# latest download: http://www.ws-i.org/Testing/Tools/2005/06/WSI_Test_Java_Final_1.1.zip
#
# Before launching this test, you should download the zip file and unpack it in this
# directory this should create the wsi-test-tools directory.
#
# Adapted from http://thestewscope.wordpress.com/2008/08/19/ruby-wrapper-for-ws-i-analyzer-tools/
# from <NAME>  <<EMAIL>>
#

import os
import string
from lxml import etree

CONFIG_FILE = 'config.xml'
RPCLIB_TEST_NS = 'rpclib.test.interop.server._service'
RPCLIB_TEST_SERVICE = 'ValidatingApplication'
RPCLIB_TEST_PORT = 'ValidatingApplication'
RPCLIB_REPORT_FILE = 'wsi-report-rpclib.xml'


WSI_ANALYZER_CONFIG_TEMPLATE=string.Template("""\
<?xml version="1.0" encoding="UTF-8"?>
<wsi-analyzerConfig:configuration name="WS-I Basic Profile Analyzer Configuration" \
      xmlns:wsi-analyzerConfig="http://www.ws-i.org/testing/2004/07/analyzerConfig/">
<wsi-analyzerConfig:description />
<wsi-analyzerConfig:verbose>false</wsi-analyzerConfig:verbose>
<wsi-analyzerConfig:assertionResults type="all" messageEntry="true" failureMessage="true"/>
<wsi-analyzerConfig:reportFile replace="true" location="${REPORT_FILE}">
    <wsi-analyzerConfig:addStyleSheet href="${STYLESHEET_FILE}" type="text/xsl"/>
</wsi-analyzerConfig:reportFile>
<wsi-analyzerConfig:testAssertionsFile>${ASSERTIONS_FILE}</wsi-analyzerConfig:testAssertionsFile>
<wsi-analyzerConfig:wsdlReference>
    <wsi-analyzerConfig:wsdlElement type="port" parentElementName="${SERVICE_NAME}" \
    namespace="${WSDL_NAMESPACE}">${PORT_NAME}</wsi-analyzerConfig:wsdlElement>
    <wsi-analyzerConfig:wsdlURI>${WSDL_URI}</wsi-analyzerConfig:wsdlURI>
</wsi-analyzerConfig:wsdlReference>
</wsi-analyzerConfig:configuration>""")

#This must be changed to point to the physical root of the wsi-installation
WSI_HOME_TAG = "WSI_HOME"<commit_msg>updated application info in test_wsi<commit_after>#!/usr/bin/env python
#
# WS-I interoperability test http://www.ws-i.org/deliverables/workinggroup.aspx?wg=testingtools
# latest download: http://www.ws-i.org/Testing/Tools/2005/06/WSI_Test_Java_Final_1.1.zip
#
# Before launching this test, you should download the zip file and unpack it in this
# directory this should create the wsi-test-tools directory.
#
# Adapted from http://thestewscope.wordpress.com/2008/08/19/ruby-wrapper-for-ws-i-analyzer-tools/
# from <NAME>  <<EMAIL>>
#

import os
import string
from lxml import etree

CONFIG_FILE = 'config.xml'
RPCLIB_TEST_NS = 'rpclib.test.interop.server'
RPCLIB_TEST_SERVICE = 'Application'
RPCLIB_TEST_PORT = 'Application'
RPCLIB_REPORT_FILE = 'wsi-report-rpclib.xml'

WSI_ANALYZER_CONFIG_TEMPLATE=string.Template("""<?xml version="1.0" encoding="UTF-8"?>
<wsi-analyzerConfig:configuration name="WS-I Basic Profile Analyzer Configuration"
      xmlns:wsi-analyzerConfig="http://www.ws-i.org/testing/2004/07/analyzerConfig/">
  <wsi-analyzerConfig:description />
  <wsi-analyzerConfig:verbose>false</wsi-analyzerConfig:verbose>
  <wsi-analyzerConfig:assertionResults type="all" messageEntry="true"
      failureMessage="true"/>
  <wsi-analyzerConfig:reportFile replace="true" location="${REPORT_FILE}">
    <wsi-analyzerConfig:addStyleSheet href="${STYLESHEET_FILE}" type="text/xsl"/>
  </wsi-analyzerConfig:reportFile>
  <wsi-analyzerConfig:testAssertionsFile>
    ${ASSERTIONS_FILE}
  </wsi-analyzerConfig:testAssertionsFile>
  <wsi-analyzerConfig:wsdlReference>
    <wsi-analyzerConfig:wsdlElement type="port"
          parentElementName="${SERVICE_NAME}" namespace="${WSDL_NAMESPACE}">
      ${PORT_NAME}
    </wsi-analyzerConfig:wsdlElement>
    <wsi-analyzerConfig:wsdlURI>${WSDL_URI}</wsi-analyzerConfig:wsdlURI>
  </wsi-analyzerConfig:wsdlReference>
</wsi-analyzerConfig:configuration>
""")

#This must be changed to point to the physical root of the wsi-installation
WSI_HOME_TAG = "WSI_HOME"
{'fraction_non_alphanumeric': 0.13659274193548387, 'fraction_numerical': 0.012600806451612902, 'mean_word_length': 6.377323420074349, 'pattern_counts': {'":': 0, '<': 45, '<?xml version=': 2, '>': 45, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, 'xml': 10}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5507922', 'n_tokens_mistral': 1442, 'n_tokens_neox': 1374, 'n_words': 212}