Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to provide a test timeout for every test in a session. #26

Closed
AbhitejJohn opened this issue Dec 14, 2016 · 6 comments
Closed

Ability to provide a test timeout for every test in a session. #26

AbhitejJohn opened this issue Dec 14, 2016 · 6 comments
Labels
Help-Wanted The issue is up-for-grabs, and can be claimed by commenting

Comments

@AbhitejJohn
Copy link
Contributor

Description

Currently the timeout for a test is only an attribute apply-able on a test method in code. This cannot be changed without a rebuild of the test code. This request is to add a configurable timeout for each test in a session. This can be achieved via an additional setting in the runsettings section for the adapter like below:

<Runsettings>
   <MSTest>
      <TestTimeout>2000</TestTimeout>
   </MSTest>
</Runsettings>

So when the above runsettings is provided in a session, every test in that session can run for a maximum of 2000 milliseconds.

@AbhitejJohn AbhitejJohn changed the title Ability to provide a session wide timeout specification Ability to provide a test timeout for every test in a session. Mar 14, 2017
@AbhitejJohn AbhitejJohn added Help-Wanted The issue is up-for-grabs, and can be claimed by commenting enhancement labels Apr 5, 2017
@AbhitejJohn
Copy link
Contributor Author

Few spec questions before implementing this:

  1. What would happen if a test has its own timeout defined via the Timeout attribute? Which takes precedence?
  2. All tests running in a session would now become time bound. Can/should a test opt-out?
    /cc @pvlakshm

@pvlakshm
Copy link
Contributor

pvlakshm commented Apr 6, 2017

  1. the attribute farthest to the method will win.
  2. if a method wants to, it can set a custom time out for itself, but (1) would still apply.

@pvlakshm pvlakshm mentioned this issue Apr 7, 2017
16 tasks
@mikefourie-zz
Copy link

Any ETA on this?

@AdamDotNet
Copy link

It looks like this is just about done in #403. So look forward to NuGet 1.3.0 to have it?

@IanKemp
Copy link

IanKemp commented Jun 11, 2018

@AdamDotNet Can confirm this is present in 1.3.2 at least, docs still don't reflect it though.

@smadala
Copy link
Contributor

smadala commented Jun 11, 2018

@IanKemp It was released in 1.3.0 version. Documented here.

@smadala smadala closed this as completed Jun 11, 2018
singhsarab pushed a commit to singhsarab/testfx that referenced this issue Apr 8, 2019
* Initial Draft for Framework related changes.
- Fixed the Json serialization issues
- Added the Processor for Framework
- Fixed the tests
- Added new tests for Processor
* Fix unit tests for framework support.
* Clean json serialization in ObjectModel, TranslationLayer.

Json serialization doesn't use embedded type information. Removed dependency of OM on json.net. Fix microsoft#26.
Standardize property serialization for TestObject and derived objects. Derived objects don't need to mark
properties as serializable, this trims the data sent over the wire.
Properties in a TestObject are serialized in json as Properties array.
Remove any special handling of TestProperty values, these are always deserialized as string. A consumer may
write custom converters to interpret them. E.g. add a converter for KeyValuePair<string, string>[] data
required by traits.
* Move test projects to dotnet-test-mstest 1.1.1-preview.
* Use null values for TestProperty as-is during deserialization.
* Add guard for desktop assemblies in test property data. Fix a deserialization test issue.
* Add a string array converter for test properties. Add netcore framework type.
* Add datetime handling for JSON parsing. Use Utc and ISO date formats for all datetimes.
Use the same settings in product for json unit tests.
* Add VSTEST_RUNNER_DEBUG and VSTEST_HOST_DEBUG environment variables to allow
attach debugger to the runner and host processes.
* Update OM.nuspec since json.net is no longer a dependency.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help-Wanted The issue is up-for-grabs, and can be claimed by commenting
Projects
None yet
Development

No branches or pull requests

6 participants