Перейти к содержимому

Фотография

mstest.exe для specflow playlist

mstest specflow visual studio 2012

  • Авторизуйтесь для ответа в теме
Сообщений в теме: 6

#1 psixvoploti

psixvoploti

    Новый участник

  • Members
  • Pip
  • 26 сообщений


Отправлено 27 января 2014 - 13:44

Я пишу тесты с помощью specflow.

В VS2012 создала playlist этих тестов.

Как мне запустить из в mstest, ну или на крайняк в msbuild не из vs.

 

Пыталась

mstest.exe /testmetadata: file.playlist

но не выходит.Помогите, кто может. Совсем отчаялась(


  • 0

#2 checo

checo

    Опытный участник

  • Members
  • PipPipPipPip
  • 400 сообщений
  • Город:Н.Новгород

Отправлено 27 января 2014 - 14:54

Плейлисты - это совсем новая фича.

И, как видно, консольный mstest еще их не поддерживает.

В документации сказано, что метаданные должны быть в формате .vsmdi, как раньше.

Для начала, попробуйте запустить:

mstest.exe /testcontainer:[ваша DLL] /test:[имя какого-то теста]

Если получится запустить 1 тест, можно будет помозговать и подобрать наиболее удобные ключи из доступных.


  • 0

#3 psixvoploti

psixvoploti

    Новый участник

  • Members
  • Pip
  • 26 сообщений


Отправлено 27 января 2014 - 17:39

 

Спасибо, попробую.

А вообще VS21012 поддерживает консольный mstest? 


  • 0

#4 psixvoploti

psixvoploti

    Новый участник

  • Members
  • Pip
  • 26 сообщений


Отправлено 28 января 2014 - 05:30

 

 

Спасибо, попробую.

А вообще VS21012 поддерживает консольный mstest? 

 

 
Summary
-------
Test Run Failed.
  Failed  1
  ---------
  Total   1
Results file:  C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\T
estResults\KLapteva_KLAPTEVA 2014-01-28 09_29_10.trx
Test Settings: Default Test Settings
 
Run has the following issue(s):
Warning: Test Run deployment issue: The assembly or module 'ServiceStack.Interfa
ces' directly or indirectly referenced by the test container 'c:\svn-spidermind\
trunk\spidermind.internetcrawler\cloudinternetcrawler\crawler.behaviortests\bin\
debug\behaviortests.dll' was not found.
Warning: Test Run deployment issue: The assembly or module 'ServiceStack.Common'
 directly or indirectly referenced by the test container 'c:\svn-spidermind\trun
k\spidermind.internetcrawler\cloudinternetcrawler\crawler.behaviortests\bin\debu
g\behaviortests.dll' was not found.
Warning: Test Run deployment issue: The assembly or module 'ServiceStack.OrmLite
' directly or indirectly referenced by the test container 'c:\svn-spidermind\tru
nk\spidermind.internetcrawler\cloudinternetcrawler\crawler.behaviortests\bin\deb
ug\behaviortests.dll' was not found.

  • 0

#5 checo

checo

    Опытный участник

  • Members
  • PipPipPipPip
  • 400 сообщений
  • Город:Н.Новгород

Отправлено 28 января 2014 - 07:38


А вообще VS21012 поддерживает консольный mstest? 

Cудя по дереву процессов, из VS запускается не mstest.exe, а некий vstest.executionengine.exe


  • 0

#6 checo

checo

    Опытный участник

  • Members
  • PipPipPipPip
  • 400 сообщений
  • Город:Н.Новгород

Отправлено 28 января 2014 - 07:46

 

Summary
-------
Test Run Failed.
  Failed  1
  ---------
  Total   1
Results file:  C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\T
estResults\KLapteva_KLAPTEVA 2014-01-28 09_29_10.trx
Test Settings: Default Test Settings
 
Run has the following issue(s):
Warning: Test Run deployment issue: The assembly or module 'ServiceStack.Interfa
ces' directly or indirectly referenced by the test container 'c:\svn-spidermind\
trunk\spidermind.internetcrawler\cloudinternetcrawler\crawler.behaviortests\bin\
debug\behaviortests.dll' was not found.
Warning: Test Run deployment issue: The assembly or module 'ServiceStack.Common'
 directly or indirectly referenced by the test container 'c:\svn-spidermind\trun
k\spidermind.internetcrawler\cloudinternetcrawler\crawler.behaviortests\bin\debu
g\behaviortests.dll' was not found.
Warning: Test Run deployment issue: The assembly or module 'ServiceStack.OrmLite
' directly or indirectly referenced by the test container 'c:\svn-spidermind\tru
nk\spidermind.internetcrawler\cloudinternetcrawler\crawler.behaviortests\bin\deb
ug\behaviortests.dll' was not found.

 

Ну так он же конкретно пишет, каких файлов ему не хватает.

К сожалению, не работал со SpecFlow, не могу подсказать правильный рецепт сборки проекта.

Но вообще, что-то подсказывает, что не находит он библиотеки, к которым задан относительный путь, либо вообще они должны быть в рабочей папке. Тесты лучше запускать не из C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\..., а из папки со скомпилированным проектом, прописав путь к mstest в PATH.


  • 0

#7 wret

wret

    Активный участник

  • Members
  • PipPip
  • 124 сообщений
  • Город:Москва

Отправлено 13 августа 2014 - 12:51

Необходимые файлы к тесту можно прикреплять с помощью атрибута DeploymentItem


  • 0



Количество пользователей, читающих эту тему: 0

0 пользователей, 0 гостей, 0 анонимных