Skip to content

Commit

Permalink
Merge pull request #17 from proDOOMman/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
proDOOMman authored Apr 23, 2020
2 parents bf9a460 + 0d3d985 commit 08485c6
Show file tree
Hide file tree
Showing 176 changed files with 7,092 additions and 169 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ gradle-app.setting
/.settings
/.vscode
/bin/
/choco/*.nupkg
.scannerwork
73 changes: 41 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,38 +9,47 @@
3) Проверяем что dbgs.exe (https://its.1c.ru/db/edtdoc/content/197/hdoc/_top/dbgs) запустился и работает. Для этого в браузере открываем его, адрес по умолчанию http://127.0.0.1:1550/. В случае успеха выдолжны увидеть сообщение "... it works!".
4) Выгружаем исходники конфигурации или расширения в файлы.
5) Запускаем анализ покрытия командой ```Coverage41C -i <ИмяИнформационнойБазыВКластере> -P <ПутьКПроекту> -s <ПутьКИсходникамОтносительноКорняПроекта> -o <ИмяВыходногоФайлаПокрытия> -e <ИмяРасширения>```. Для файловой базы нужно указать адрес отладчика и предопределённое имя информационной базы ```-i DefAlias -u http://127.0.0.1:<Порт>```.
6) Выполняем тесты
7) Останавливаем программу нажатием Ctrl+C в окне терминала или командой ```Coverage41C -a stop -i <ИмяИнформационнойБазыВКластере> -u http://127.0.0.1:<Порт>```
8) Полученный файл в формате genericCoverage.xml загружаем в SonarQube.
6) (Опционально, полезно для конвейера) Проверяем статус программы командой ```Coverage41C -i <ИмяИнформационнойБазыВКластере> -a check```.
7) Выполняем тесты
8) Останавливаем программу нажатием Ctrl+C в окне терминала или командой ```Coverage41C -a stop -i <ИмяИнформационнойБазыВКластере> -u http://127.0.0.1:<Порт>```. Также возможна запись файла покрытия без остановки замеров командой ```-a dump```.
9) Полученный файл в формате genericCoverage.xml загружаем в SonarQube.

```cmd
Usage: Coverage41C [-hV] [-p] [-a=<commandAction>] [-e=<extensionName>]
-i=<infobaseAlias> [-o=<outputFile>] [-r=<removeSupport>]
[-s=<srcDirName>] [-t=<pingTimeout>] [-u=<debugServerUrl>]
[-n=<debugAreaNames>]...
Make measures from 1C:Enterprise and save them to genericCoverage.xml file
-a, --action=<commandAction>
Action: start, stop. Default - start
-i, --infobase=<infobaseAlias>
InfoBase name
-e, --extensionName=<extensionName>
Extension name
-s, --srcDir=<srcDirName>
Directory with sources exported to xml
-P, --projectDir=<projectDirName>
Directory with project
-o, --out=<outputFile> Output file name
-u, --debugger=<debugServerUrl>
Debugger url. Default - http://127.0.0.1:1550/
-p, --password Dbgs password
-n, --areanames=<debugAreaNames>
Debug area names (not for general use!)
-t, --timeout=<pingTimeout>
Ping timeout. Default - 1000
-r, --removeSupport=<removeSupport>
Remove support values: NOT_EDITABLE,
EDITABLE_SUPPORT_ENABLED, NOT_SUPPORTED, NONE.
Default - NONE
-h, --help Show this help message and exit.
-V, --version Print version information and exit.
Usage: Coverage41C [-hV] [-p] [--verbose] [-a=<commandAction>]
[-e=<extensionName>] -i=<infobaseAlias> [-o=<outputFile>]
[-P=<projectDirName>] [-p:env=<passwordEnv>]
[-r=<removeSupport>] [-s=<srcDirName>] [-t=<pingTimeout>]
[-u=<debugServerUrl>] [-x=<externalDataProcessorUrl>]
[-n=<debugAreaNames>]...
Make measures from 1C:Enterprise and save them to genericCoverage.xml file
-a, --action=<commandAction>
Action: start, stop, dump, clean, check. Default -
start
-i, --infobase=<infobaseAlias>
InfoBase name. For file infobase use 'DefAlias' name
-e, --extensionName=<extensionName>
Extension name
-x, --externalDataProcessor=<externalDataProcessorUrl>
External data processor (or external report) url
-s, --srcDir=<srcDirName>
Directory with sources exported to xml
-P, --projectDir=<projectDirName>
Directory with project
-o, --out=<outputFile> Output file name
-u, --debugger=<debugServerUrl>
Debugger url. Default - http://127.0.0.1:1550/
-p, --password Dbgs password
-p:env, --password:env=<passwordEnv>
Password environment variable name
-n, --areanames=<debugAreaNames>
Debug area names (not for general use!)
-t, --timeout=<pingTimeout>
Ping timeout. Default - 1000
-r, --removeSupport=<removeSupport>
Remove support values: NOT_EDITABLE,
EDITABLE_SUPPORT_ENABLED, NOT_SUPPORTED, NONE.
Default - NONE
--verbose If you need more logs. Default - false
-h, --help Show this help message and exit.
-V, --version Print version information and exit.
```
23 changes: 20 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
}

group 'com.clouds42'
version '1.1-SNAPSHOT'
version '1.2-SNAPSHOT'

sourceCompatibility = 11

Expand All @@ -23,8 +23,12 @@ dependencies {
def output = new ByteArrayOutputStream()
def edtLocation = System.getenv('EDT_LOCATION')
if (edtLocation == null) {
def ringExecutable = 'ring.sh'
if (System.getProperty('os.name').toLowerCase(Locale.ROOT).contains('windows')) {
ringExecutable = 'ring.cmd'
}
exec {
commandLine 'powershell', 'ring', 'edt', 'locations', 'list'
commandLine ringExecutable, 'edt', 'locations', 'list'
standardOutput = output
}
edtLocation = output.toString().trim().split("\n")[0].trim() + '/plugins/'
Expand Down Expand Up @@ -63,17 +67,30 @@ dependencies {
providedCompile fileTree(edtLocation) { include 'com._1c.g5.v8.dt.debug.core_*.jar' }
providedCompile fileTree(edtLocation) { include 'com._1c.g5.v8.dt.debug.model_*.jar' }

testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.6.2'
testCompile 'org.xmlunit:xmlunit-core:2.6.4'
testCompile 'org.xmlunit:xmlunit-matchers:2.6.4'
testCompile 'com.fasterxml.jackson.core:jackson-core:2.9.6'
testCompile 'com.fasterxml.jackson.core:jackson-databind:2.9.6'
}

compileJava {
tasks.withType(JavaCompile) {
sourceSets.main.compileClasspath += configurations.providedCompile
options.compilerArgs += ["-Aproject=${project.group}/${project.name}"]
options.encoding = 'UTF-8'
}

run {
classpath += configurations.providedCompile
}

test {
classpath += configurations.providedCompile
useJUnitPlatform()
testLogging.showStandardStreams = true
}

startScripts {
unixStartScriptGenerator.template = resources.text.fromFile(project.getRootDir().getAbsolutePath() + '/scripts/unixStartScript.txt')
windowsStartScriptGenerator.template = resources.text.fromFile(project.getRootDir().getAbsolutePath() + '/scripts/windowsStartScript.txt')
Expand Down
2 changes: 1 addition & 1 deletion choco/coverage41c.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<!-- version should MATCH as closely as possible with the underlying software -->
<!-- Is the version a prerelease of a version? https://docs.nuget.org/create/versioning#creating-prerelease-packages -->
<!-- Note that unstable versions like 0.0.1 can be considered a released version, but it's possible that one can release a 0.0.1-beta before you release a 0.0.1 version. If the version number is final, that is considered a released version and not a prerelease. -->
<version>1.0</version>
<version>1.2</version>
<packageSourceUrl>https://github.com/proDOOMman/Coverage41C</packageSourceUrl>
<owners>proDOOMman</owners>
<!-- ============================== -->
Expand Down
Loading

0 comments on commit 08485c6

Please sign in to comment.